Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » Equinox Registry and Adapter factory(Cannot deploy both org.eclipse.equinox.registry and org.eclipse.equinox.common)
Equinox Registry and Adapter factory [message #857160] Thu, 26 April 2012 05:40 Go to next message
GianMaria Romanato is currently offline GianMaria Romanato
Messages: 59
Registered: July 2009
Member
Hi,

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.
Giamma.

Re: Equinox Registry and Adapter factory [message #858701 is a reply to message #857160] Fri, 27 April 2012 04:55 Go to previous message
Florian Waibel is currently offline Florian Waibel
Messages: 94
Registered: June 2010
Member
Hi,

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"
                xmlns="..."
                xmlns:xsi="..."
                xsi:schemaLocation="...">

	<artifact type="bundle" name="org.eclipse.equinox.registry" version="[3.4.0, 4)" />
</plan>


Place the required bundles aside the "extension" into repository/usr:


  • org.eclipse.equinox.common_3.6.0.v20110523.jar
  • org.eclipse.equinox.registry_3.5.101.R37x_v20110810-1611.jar


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/

Regards,
Florian
Previous Topic:Connecting to Virgo's JMX
Next Topic:Virgo 3.0.3.RELEASE
Goto Forum:
  


Current Time: Sun Aug 31 04:43:50 EDT 2014

Powered by FUDForum. Page generated in 0.01775 seconds