|Equinox Registry and Adapter factory [message #857160]
||Thu, 26 April 2012 05:40
| GianMaria Romanato
Registered: July 2009
I am writing an OSGi application and I would like to use of both the Equinox Registry and the Equinox IAdapterManager. This implies deployment of at least equinox.common and equinox.registry. Now, both the bundles export the org.eclipse.core.runtime package and virgo refuses to wire the dependencies. I read that by design Virgo does not favour split packages and because of that encourages the use of Import-Package or, when not possible, Import-Bundle in place of the Require-Bundle.
Now, I tried in several ways but all of them failed:
- Put equinox.common, equinox.registry, equinox.util and equinox.supplement in repository/usr and Import-Package org.eclipse.core.runtime, but this fails due to the split package issue
- Put equinox.common, equinox.registry, equinox.util and equinox.supplement in repository/usr and Import-Bundle equinox.common and equinox.registry but this fails due to the split package issue
- Put equinox.common, equinox.registry, equinox.util and equinox.supplement in repository/usr and Require-Bundle equinox.common and equinox.registry but this fails at runtime and does not compile in the workspace (I am using Virgo Tools)
- Repackage equinox.common, equinox.registry, equinox.util and equinox.supplement as JARs inside a new bundle which exports all the packages provided by the four bundles, and put the new cumulative bundle in the repository/usr folder, but Virgo tools refuses to compile classes that import IExtensionRegistry stating that package "org.eclipse" does not exist and IExtensionRegistry cannot be resolved.
Can anyone give an advice?
I am using Virgo 3.0.2 but made most tests with 3.5 M6 as well without success.
I am using Eclipse 3.7.2 with the last official release of Virgo Tools.
Thanks a lot.
|Re: Equinox Registry and Adapter factory [message #858701 is a reply to message #857160]
||Fri, 27 April 2012 04:55
| Florian Waibel
Registered: June 2010
you could extend Virgo.
Create a file org.eclipse.equinox.registry-3.5.plan in repository/usr:
<plan name="org.eclipse.equinox.registry" version="3.6.0" scoped="false" atomic="true"
<artifact type="bundle" name="org.eclipse.equinox.registry" version="[3.4.0, 4)" />
Place the required bundles aside the "extension" into repository/usr:
Add add the extension to the initial artifacts. That would be in org.eclipse.virgo.kernel.userregion.properties:
# the next line must not be broken with back-slashes
initialArtifacts=repository:plan/org.eclipse.virgo.kernel.userregion.springdm, repository:plan/org.eclipse.virgo.web.tomcat, repository:plan/org.eclipse.equinox.registry
For further information please have a look at codewax.org path eclipse/extending-virgo-with-a-httpservice/
Powered by FUDForum
. Page generated in 0.02144 seconds