VMware {code} Community
Flying_Cat
Contributor
Contributor

How do I include dependent 3rd party libs that configured in Bundle-ClassPath for plugin-service.jar when deploying Virgo server in Eclipse?

Hi laurentsd,

We found a solution that is to "inline" (or nest) the library inside our own plugin bundle by following these below steps from this discussion https://communities.vmware.com/thread/444903 (The reason, as you said, that we don't want to modify 3rd party libraries that are not OSGI enabled, and deal with Import-Package):

1) Package our plugin-service.jar to include the dependent 3rd party libs at the root level of the .jar file for instance.

2) Add the following line to our Java bundle's manifest: Bundle-ClassPath: ., my3rdPartyLibrary.jar

Actually we use this solution for bundling our plugin with them successfully ouside of Eclipse, but how can we start virgo server with the 3rd party libs in Eclipse if we want to debug our plugin Java service? 

0 Kudos
1 Reply
_vladi_
VMware Employee
VMware Employee

Hi,

Inside or outside Eclipse your Java service is being built as a JAR bundle containing a manifest and deployed on the Virgo server. If there is a difference in what you get as a result please check what kind of JAR bundle has been deployed in both cases and compare the differences. It might be that the build script going through a different from in your case.

In both scenarios the bundle is being copied to the server/pickup folder so you can unzip and inspect it.

Cheers,

Vladi

0 Kudos