Hi,

I'm using the Maven BND plugin to generate the manifest for a WAR file that contains embedded dependencies. I have tried to follow all the guidelines out there (OPS4J+Apache websites), but without luck.

The main problem seems to be that the plugin cannot recognize where the embedded dependencies are. My POM BND instructions look like this:
<Export-Package>
    ... exported packages *from embedded dependencies* goes here...
    ... exported packages from WAR project goes here ...
</Export-Package>

<Bundle-ClassPath>.,WEB-INF/classes</Bundle-ClassPath>

<Embed-Directory>WEB-INF/lib/</Embed-Directory>
... more instructions ...

When I run Maven on this it generates warnings like this:
[WARNING] Warning in manifest for se.streamsource.streamflow:streamflow-web:war:1.1-SNAPSHOT : No sub JAR or directory WEB-INF/classes [WARNING] Warning in manifest for se.streamsource.streamflow:streamflow-web:war:1.1-SNAPSHOT : No sub JAR or directory WEB-INF/lib/somedependency.jar
... and so on with one warning line for each embedded jar ...

The resulting WAR has the correct WEB-INF/lib with all the jar files, the BundleClasspath header *is correct* (with all WEB-INF/lib dependencies added to it), but the ExportPackage header is wrong as it does not include the packages from the dependencies that I want to export. Funnily enough, the corresponding ImportPackage header *is correct*, i.e. it includes imports of the packages I wanted to export!

Am I doing something wrong here, or is the BND plugin not able to handle WAR files with embedded dependencies properly yet?

thanks, Rickard

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to