Dependency issue creating Nexus 3 Bundle

Hey guys,

I’m working on a Nexus 3 Bundle and am having issues creating the bundle properly. I am using some libraries created by my team which performs a lot of the actions we need. These libraries reference some classes from the java runtime library (Javax.net.ssl.HostnameVerifier is an example of one) which don’t appear to be available once installed in Nexus. This is likely because no other bundle exports these classes and they’re not available from OSGi by default. Since they’re not available, I can’t simply call Import-Package and retrieve them. I’ve tried also Embedding these dependencies through my bundle, but it doesn’t seem to find them still.

I’ve tried many things to try and make these available but none have seemed to work yet. Is it recommended to add my own rt.jar file to my bundle so that I can run these classes? I prefer to use Nexus’ Java classes instead of embeding one.

Something that would be beneficial is if these classes were exported somewhere in the Nexus bundles so we can use the ones you want us to use.

Additionally, I’ve found the OSGi header ‘Fragment-Host’ which allows me to hook into another bundle and use classes in there. You can use this command to hook into the base framework and use those classes (Which I believe includes the classes I need). However, I can’t use this command in combination with the Import-Package command which I need to do as I need to import my own class files. Apache Felix changed this functionality in their most recent version, perhaps updating to the most recent would allow me to add this header.

Any help would be appreciated. If i’m going about this completely wrong, I’d love to learn what I should be focusing on instead. This has been the biggest hurdle for us so far trying to develop a Bundle for Nexus 3.