On 14 Mar 2013, at 16:58, David Bosschaert wrote:
> Hi all,
>
> I'm using the maven-bundle-plugin (2.3.7) to turn a .WAR file into an OSGi
> WAB.
>
> In my maven dependencies I depend on the WAR file like this:
> <dependency>
> <groupId>org.acme</groupId>
> <artifactId>acme-war</artifactId>
> <version>1.0.0</version>
> <type>war</type>
> </dependency>
> The war file contains a bunch of embedded jar files in its WEB-INF/lib
> directory.
>
> This maven module also adds some additional classes so I'd like the mbp/bnd
> to generate the OSGi Manifest. This seems to work with the following
> maven-bundle-plugin configuration:
> <Embed-Directory>/</Embed-Directory>
> <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency>
>
> I set the embed directory to / because the acme-war that I depend on
> already has the right structure...
> So all the artifacts are in my generated bundle in the place where I want
> them, but now I need to generate the Bundle-ClassPath to list all the jar
> files in WEB-INF/lib. I tried
>
> <Bundle-ClassPath>.,{maven-dependencies},WEB-INF/classes</Bundle-ClassPath>
> but that doesn't work. I also tried:
> <Bundle-ClassPath>.,WEB-INF/lib/*.jar,WEB-INF/classes</Bundle-ClassPath>
> but that doesn't expand *.jar.
>
> Anyone an idea?
Why not use the <_wab/> BND instruction? http://www.aqute.biz/Bnd/Format#wab
Also note that the default Embed-Directory will put the embedded/inlined
content in the root of your bundle, so you shouldn't need to set it to '/'.
> Cheers,
>
> David
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]