Hi Adam,

it's as I said create a proper OSGi bundle, best case embed both of your
bundles into one.
And while at it, the blog has some flaws especially about the "bug" it's an
expected behavior as the maven-bundle-plugin
backed by bnd (the same by the way that pax-url-wrap is using) doesn't know
of the "optional" declaration of the original manifest as it doesn't parse
that one.
But besides that you can stick to that sample as blueprint to get your own
bundles "wraped" :-)

regards, Achim


2015-06-25 18:29 GMT+02:00 Adams, Joe <joe.ad...@cmegroup.com>:

> Thanks everyone.  I believe Pedro's blog shows how to correctly do this.
> It looks like using BND simply is not an option.
>
> From: Achim Nierbeck <bcanh...@googlemail.com<mailto:
> bcanh...@googlemail.com>>
> Date: Thursday, June 25, 2015 at 3:57 AM
> To: "users@felix.apache.org<mailto:users@felix.apache.org>" <
> users@felix.apache.org<mailto:users@felix.apache.org>>
> Cc: Joe Adams <joe.ad...@cmegroup.com<mailto:joe.ad...@cmegroup.com>>
> Subject: Re: Complicated wrapping
>
> doh' this isn't Karafs fault ...
>
> if you want to install two bundles that are no osgi bundles you have the
> convenience of installing those non-osgi bundles with the wrap url handler.
> So what does the wrap-URL-Handler mean, it'll grab the maven artifact and
> do an automatic osgi bundling to it. How does it do it?
> It uses bnd for creating a OSGi-Manifest and places it back into the used
> artifact stored in the osgi-cache.
>
> So at this point it's the fault of the two jars, cause both now export the
> same packages  com.blah.logging which result in a split-package situation.
> And at this point it's not Karaf that is mad at you it's the OSGi
> Framework. Since you are posting this to the felix mailinglist (not the
> karaf one)
> I guess you are using the default OSGi Framework in Karaf which is Felix.
>
> In the end Felix is mad at you because you deployed two bundles exporting
> the same packages and didn't tell the framework how to handle this
> split-package situation.
>
> How to solve this mess?
> Try to bundle those non-osgi artifacts into either one big uber-bundle or
> create two seperate ones with a clear export-package strategy and maybe a
> declaration for the resolver on how to handle this split-package situation.
>
>
> regards, Achim
>
>
> 2015-06-25 10:49 GMT+02:00 Pedro Domingues <pedro.doming...@ist.utl.pt
> <mailto:pedro.doming...@ist.utl.pt>>:
> I have never used karaf, but it seems disappointing.
>
> I am currently fixing my blog, hence some content like pictures can be
> missing. However take a look at the ways I use to embed dependencies and
> see if any helps. I use maven: http://web.ist.utl.pt/ist162500/?cat=2
>
> On June 24, 2015 10:47:07 PM WEST, Joe <joe.ad...@cmegroup.com<mailto:
> joe.ad...@cmegroup.com>> wrote:
> >Hi,
> >
> >I'm trying to wrap a couple of jars as a bundle.  The main bundle I
> >want is
> >called logging, but it has dependencies on another bundle called
> >logging-common.  I am getting them both from maven.  However, Karaf is
> >mad
> >at me because they both contain some of the same packages.  They both
> >have
> >packages called com.blah.logging and com.blah.logging.support.
> >
> >Would it be possible to wrap them both in a bundle using the wrap
> >command in
> >bundle, in a feature.xml file?
> >
> >Do I need a more complex scheme?  Would I need to make a bundle that
> >imports
> >the dependences through maven and then exposes the logging package?
> >
> >Thanks!
> >
> >
> >
> >--
> >View this message in context:
> >
> http://apache-felix.18485.x6.nabble.com/Complicated-wrapping-tp5013411.html
> >Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: users-unsubscr...@felix.apache.org<mailto:
> users-unsubscr...@felix.apache.org>
> >For additional commands, e-mail: users-h...@felix.apache.org<mailto:
> users-h...@felix.apache.org>
>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Reply via email to