You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Henri Gomez <he...@gmail.com> on 2009/02/17 18:21:52 UTC

Re: maven / osgi / repositories

I play with maven-bundle-plugin and used Embed-Dependency to bundle
from an existing jar :)




2009/1/29 Richard S. Hall <he...@ungoverned.org>:
> Patrick Forhan wrote:
>>
>> On Thu, Jan 29, 2009 at 3:10 PM, Richard S. Hall <he...@ungoverned.org>
>> wrote:
>>
>>>
>>> Keep in mind that a normal JAR file is always a bundle, but a bundle is
>>> not
>>> always a normal JAR file. If you embed JAR files or native libraries in
>>> your
>>> bundle, then you cannot use it as a normal JAR file.
>>>
>>
>> Can you clarify?  I assume you mean that osgi is doing a little bit of
>> magic with respect to embedded JARs and native libraries, so you can't
>> use those portions straight up.  But they are still jar files, with a
>> jar-manifest, classes where java expects them (except in the embedded
>> JAR case), and so on.
>>
>
> If you embed JAR files in your bundle (and they are on your
> Bundle-ClassPath), then OSGi automatically makes them available to your
> bundle for class loading. Putting this bundle on the class path would result
> in class loading failures because it would no longer have access to its
> required bundle class path elements.
>
>> I haven't had a whole lot of luck with plain jar files as bundles,
>> I'll have to read up in the spec how they are to be treated.
>>
>
> Yeah, you can install a normal JAR file, but it isn't very useful. The only
> thing you can really do with it is use Bundle.loadClass(),
> Bundle.getResource(), etc. to load stuff out of it.
>
> -> richard
>>
>> Pat.
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org