CS> if I'm getting it right looking through the sources what you have done
CS> is set EXPORT_BUNDLE to all packages in the jar and pass that to the
CS> lower layers, making a bundle that will have all packages in the
CS> classpath that the original jar had.
CS> I tried that before and had some problems
CS> - if a package is in two jars in the classpath both classes end in
CS> bundle and you get no warnings
CS> - if there are resources in places like root or META-INF (usually
CS> license or notice files) you may get the ones from other jars.

I am using only the Analyzer class and therefore do not construct the
JAR. I am using the original contents and do not add or remove
anything. I am only calculating the manifest and merging it with the
original and then writing out a copy. So this should not be a problem.
If you look at wrap, you'll see I never do build, I give the original
JAR to the analyzer.

Did you try it out on some bundles?

Kind regards,

     Peter Kriens



CS> That's why I decided to implement it passing a new classpath that will
CS> be used to export packages only, so nothing else gets in the
CS> destination bundle.


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




-- 
Peter Kriens                              Tel +33467542167
9C, Avenue St. Drézéry                    AOL,Yahoo: pkriens
34160 Beaulieu, France                    ICQ 255570717
Skype pkriens                             Fax +1 8153772599

Reply via email to