Weaving and early bundle activation [message #1278666] |
Thu, 27 March 2014 17:16 |
|
Hi,
we use Gemini weaving bundle for JPA weaving. This bundle needs to be started early, before the JPA classes are loaded.
In our own product we are able to define this in the config but when we piggyback our plugins on an existing Eclipse installation we have no influence on the config files.
Do you have an idea how to solve this?
Cheers,
Wim
|
|
|
|
Re: Weaving and early bundle activation [message #1280509 is a reply to message #1278666] |
Sun, 30 March 2014 12:58 |
|
On 2014-03-27 17:16:27 +0000, Wim Jongman said:
> In our own product we are able to define this in the config but when we
> piggyback our plugins on an existing Eclipse installation we have no
> influence on the config files.
>
> Do you have an idea how to solve this?
You should be able to do this using p2 instructions. Place a p2.inf
file next to a bundle manifest that gets installed.
Here is an example for org.eclipse.core.runtime:
#create a requirement on a configuration fragment
#requires.0.namespace=org.eclipse.equinox.p2.iu
#requires.0.name=configure.org.eclipse.core.runtime.startlevel
#requires.0.range=[1.0.0,1.0.0]
#requires.0.greedy=true
#create a IU fragment for configuring start levels of org.eclipse.core.runtime
#units.0.id=configure.org.eclipse.core.runtime.startlevel
#units.0.version=1.0.0
#units.0.provides.1.namespace=org.eclipse.equinox.p2.iu
#units.0.provides.1.name=configure.org.eclipse.core.runtime.startlevel
#units.0.provides.1.version=1.0.0
#units.0.instructions.unconfigure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:-1);
\
#
org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:false);
#units.0.instructions.configure=org.eclipse.equinox.p2.touchpoint.eclipse.setStartLevel(startLevel:4);
\
#
org.eclipse.equinox.p2.touchpoint.eclipse.markStarted(started:true);
#units.0.hostRequirements.1.namespace=osgi.bundle
#units.0.hostRequirements.1.name=org.eclipse.core.runtime
#units.0.hostRequirements.1.range=[3.7.0,4.0.0)
#units.0.hostRequirements.1.greedy=false
#units.0.hostRequirements.2.namespace=org.eclipse.equinox.p2.eclipse.type
#units.0.hostRequirements.2.name=bundle
#units.0.hostRequirements.2.range=[1.0.0,2.0.0)
#units.0.hostRequirements.2.greedy=false
#units.0.requires.1.namespace=osgi.bundle
#units.0.requires.1.name=org.eclipse.core.runtime
#units.0.requires.1.range=[3.7.0,4.0.0)
#units.0.requires.1.greedy=false
-Gunnar
--
Gunnar Wagenknecht
gunnar@xxxxxxxx
|
|
|
Powered by
FUDForum. Page generated in 0.04059 seconds