eclipseosgieclipse-neoneclipse-virgo

Add osgi bundle to Virgo Runtime server


I'm trying to test Eclipse Virgo server as OSGi container for my bundles. I was wishing to get easy debug possibilities, compared to deploying all bundles through Karaf console and remote debugging.

I've followed the instructions from https://wiki.eclipse.org/Virgo/Tooling and installed Tooling form site http://download.eclipse.org/virgo/snapshot/tooling (the link to update site from https://www.eclipse.org/virgo/documentation/virgo-documentation-3.6.4.RELEASE/docs/virgo-tooling-guide/html/ch03.html shows no updates). The installation was a bit crude, I've got not-so-nice screen: enter image description here and afterwards Eclipse didn't start, I was forced to start it from command line with -clean param.

However, afterwards, I was able to add Virgo Runtime server, but when I click Add Resources, I got a message: There are no resources that can be added or removed from the server.

The OSGi bundles are added to the workspace and are OSGised with maven-bundle-plugin. They are correct OSGi bundles, however, Virgo doesn't seem to recognize them.

Has the installation failed? Is Virgo incompatibile with Eclipse Neon? Or just something else went wrong?


Solution

  • Projects must have a specific nature to be deployable on Virgo. In Eclipse, a nature is a facet of a project that gives it specific features or behaviour.

    If you are using bnd tools to create the projects, it should be possible to add them to the Virgo Runtime after right clicking over the project, selecting the Virgo menu and choosing "Add OSGi Bundle Project nature". After doing that you may also have to access project properties and associate the project to the Virgo runtime.

    enter image description here

    If you are using PDE to create the projects, you should use the dedicated Virgo PDE wizard (New -> Virgo -> PDE Bundle Project) instead of the PDE default one. If your projects have been created earlier with PDE, I suggest you create a new Virgo PDE Bundle Project and compare .project files to figure out how to change the .project file of your existig PDE projects to make them usable with Virgo.

    The Virgo Tools also provide another wizard for creating OSGi bundle projects which are not PDE plug-in projects. Please have a look at the tooling documentation for understanding the differences http://www.eclipse.org/virgo/documentation/virgo-documentation-3.7.0.M01/docs/virgo-tooling-guide/html/index.html

    Note, I am an Eclipse Virgo committer.