John, In similar situations, I've used the maven-bundle-plugin to "shade" a .jar file and it's dependencies into a new bundle. Then, you simply include the new shaded bundle as a dependency, deploying the new bundle separately into karaf. This is very straightforward and can solve your issue in a very OSGi friendly manner. For examples of how this is done, take a look at how Apache Tika and ServiceMix deploy.
Please let me know if this helps! v/r, Karafman Sent from my Swwet-Axx Frakking Itouch On Dec 27, 2010, at 5:21 PM, John Bäckstrand <[email protected]> wrote: > Just a note: I see that htmlunit is actually in springsource EBR: > http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.com.gargoylesoftware.htmlunit&version=2.6.0 > > > I can't see the filters being able to easily select a tree of dependencies > so I will conclude there is no "easy" way of doing what I want. > > On Mon, Dec 27, 2010 at 23:12, Stuart McCulloch <[email protected]> wrote: > >> 2010/12/27 John Bäckstrand <[email protected]> >> >>> From my testing that alone does not work. >>> >> >> the embedding syntax is described here: >> >> >> >> http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html#ApacheFelixMavenBundlePlugin%28BND%29-Embeddingdependencies >> >> >>> I had to change >>> >>> >>> >> <Embed-Dependency>htmlunit;scope=runtime|compile;optional=false</Embed-Dependency> >>> >> >> ^ this says "embed all non-optional compile and runtime dependencies which >> have an artifactId of htmlunit" >> so even with Embed-Transitive set to true you'd only be embedding htmlunit >> and not all of its dependencies >> >> >>> to >>> >>> >> <Embed-Dependency>*;scope=runtime|compile;optional=false</Embed-Dependency> >>> >>> for transitive dependendencies to embed. >> >> >> which is expected, because this Embed-Dependency clause widens the search >> to >> include all dependencies >> >> the link above shows examples of excluding/including particular >> dependencies >> if you don't want everything >> >> >>> On Mon, Dec 27, 2010 at 22:24, Per-Erik Svensson < >>> [email protected] >>>> wrote: >>> >>>> I believe >>>> >>>> <Embed-Transitive>true</Embed-Transitive> >>>> >>>> should work. Sadly, I'm not at work so I can't check how, exactly, I >> did >>>> it. >>>> But the answer is, yes, it is possible to embed the transitive >>>> dependencies. >>>> Regarding the wild-card, >>>> >> http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.htmlhas >>>> a >>>> (somewhat) good description about how to add dependencies that match >>>> specific patterns/criteria. >>>> >>>> Just scroll down to the section "The following features are only >>> available >>>> from version 1.2.0 onwards" with the subsection "Embedding >> dependencies". >>>> >>>> Hope that helps! >>>> >>>> /Per-Erik Svensson >>>> >>>> 2010/12/27 John Bäckstrand <[email protected]> >>>> >>>>> Is there an easy way when using the maven-bundle-plugin to include >> the >>>>> transitive dependencies of a specific dependency? >>>>> >>>>> For example I want to include htmlunit since I cannot find it in a >>> bundle >>>>> form. But I also would like all its transitive dependencies. For this >>> it >>>>> seems I have to specify all the packages in Embed-Dependency >> manually, >>>>> unless I use "*" which I do not want, since my other dependencies are >>>>> bundles and I deploy them manually in karaf. >>>>> >>>>> >>>>> >>>>> -- >>>>> John Bäckstrand >>>>> >>>> >>> >>> >>> >>> -- >>> John Bäckstrand >>> >> > > > > -- > John Bäckstrand --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

