You should use Felix Maven Plugin with the Embed-Dependency directive and include a inline=false. Like this:
<Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency> See more here: http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html On Wed, Sep 2, 2009 at 8:34 AM, Dmitri Plavjanich < [email protected]> wrote: > I would like to embed unpacked jars in my bundle and include those jars in > my bundle classpath. If I try to include the jars via dependencies they > get > unpacked; I don't want them to be unpacked. If I try to use the > maven-dependency-plugin to place the jars into the resource directory at > the > compile phase then I get an odd exception: > > java.lang.IllegalArgumentException: Cannot write resource: lib/foo.jar > java.io.IOException: Opening resource > at aQute.lib.osgi.Jar.writeResource(Jar.java:296) > at aQute.lib.osgi.Jar.write(Jar.java:205) > at aQute.lib.osgi.Jar.write(Jar.java:182) > at > org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:311) > at > org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:236) > at > org.apache.felix.bundleplugin.BundlePlugin.execute(BundlePlugin.java:227) > > > > - Dmitri >
