Thanks for the response, Stuart.

So I added the following:
  <_wab>src/main/webapp</_wab>
(that's where I have my web.xml)

However this still doesn't compute the Bundle-ClassPath for me to contain
all the jars in the WEB-INF/lib.
I tried adding the following:
  <_wablib>WEB-INF/lib/*.jar</_wablib>
since the jars are already inside the WEB-INF/lib directory in the .WAR
file that is in the dependency list, but that doesn't work. (Complains that
this doesn't exist in the current module).

Additionally, using _wab moves all the static web resources from the
original .WAR to the WEB-INF/classes directory. But these need to stay at
the root...

Any ideas?

Cheers,

David



On 14 March 2013 17:08, Stuart McCulloch <[email protected]> wrote:

> 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]
>
>

Reply via email to