All, 



The application we are porting over to OSGi has a number of third party .jar 
files that for various reasons we are not able to get bundled versions.  It 
sounded like the preferred OSGi method to solve this is to place the needed 
packages in the <Export-Package> directive in the maven_bundle_plugin, which 
would result in those specific packages being unpacked, placed directly into 
the bundle being created, and added to the MANIFEST.MF file. 



The only hitch to this is when your third party .jar has a transitive 
dependency, a dependency of a dependency.  However, there are a few cases where 
there are dependencies of the transitive dependencies also.  In these cases, 
adding these dependent packages to the <Export_Packages> section results in a 
superfluous packages warning, and the exported packages are not included in the 
resulting bundle.  Upon deployment, a constraint violation occurs, identifying 
these exported packages.  I also tried simply importing the packages with a 
"resolution:=optional" direction, but that also did not work. 



I thought that <Embed-Transitives>true</Embed-Transitives> was supposed to 
override the superfluous packages warning in the Maven-Bundle-Plugin so that 
all exported packages would be included in the resulting bundle.  This does not 
appear to be the case.  So, my questions are: 

1) What does the Embed-Transitives directive actually do, and 

2) How can I override the Superfluous Packages warning so my bundle will have 
all the packages it needs for deployment? 



Creating bundles out of the offending packages is also not an option due to 
system security constraints.  And before we even go down that road, remember, 
we're in a hyper-secure world where all big companies do things (even some dumb 
things) to maintain security. 



v/r, 



Mike Van 

Reply via email to