if I'm getting it right looking through the sources what you have done is set EXPORT_BUNDLE to all packages in the jar and pass that to the lower layers, making a bundle that will have all packages in the classpath that the original jar had.
I tried that before and had some problems - if a package is in two jars in the classpath both classes end in bundle and you get no warnings - if there are resources in places like root or META-INF (usually license or notice files) you may get the ones from other jars. That's why I decided to implement it passing a new classpath that will be used to export packages only, so nothing else gets in the destination bundle. On 2/8/07, Peter Kriens <[EMAIL PROTECTED]> wrote:
See if I understand. You want to have a bundle classpath and a target jar T. Bnd should then assume the contents of T are all exports but use the versions from the classpath for imports? If so, it must be your lucky day! :-) I have changed the bnd wrap command to accept a classpath and calculate the Export-Package statement from the contents of the target jar. Read more: http://www.aqute.biz/Code/Bnd#wrap I have not exhaustively tested it but it was a small change ... and it seemed to work for the jars I tried. Latest version is 0.0.110. http://www.aqute.biz/Code/Download Kind regards, Peter Kriens CS> yes, i've seen that, and was my first implementation for the maven CS> plugin, but it misses the version information on the imports. CS> Would that be an acceptable feature for BND? CS> On 2/6/07, Peter Kriens <[EMAIL PROTECTED]> wrote: >> It is ok for bnd to not find the imports, you just do not get any >> versions. >> >> The bnd command line has a wrap command that seems to do what you >> want. http://www.aqute.biz/Code/Bnd >> >> Kind regards, >> >> Peter Kriens >> >> CS> This may be more a BND question, but here it goes >> >> CS> Is there a way to generate a bundle that matches exactly the contents >> CS> of a jar (besides the manifest of course)? >> >> CS> For what I've seen so far you need to pass the whole classpath to BND >> CS> so it can generate import headers with versions, and EXPORT_PACKAGE to >> CS> tell it what packages you want. i'm looking for an easy way to to >> CS> express export everything in this jar and nothing else. IIRC that was >> CS> the way the osgi maven plugin worked, creating bundles 1 to 1 from >> CS> jars. >> >> CS> tia >> >> >> >> -- >> Peter Kriens Tel +33467542167 >> 9C, Avenue St. Drézéry AOL,Yahoo: pkriens >> 34160 Beaulieu, France ICQ 255570717 >> Skype pkriens Fax +1 8153772599 >> >> -- Peter Kriens Tel +33467542167 9C, Avenue St. Drézéry AOL,Yahoo: pkriens 34160 Beaulieu, France ICQ 255570717 Skype pkriens Fax +1 8153772599
-- I could give you my word as a Spaniard. No good. I've known too many Spaniards. -- The Princess Bride