You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by "aldana@gmx.de" <al...@gmx.de> on 2007/09/11 14:40:26 UTC
maven-bundle-plugin: encapsulate-jar vs. deep-extract
hi,
when building a bundle dependency-jars get extracted and class files get
copied respective to package structure
mainBundleJar:
-own/classes
-external/libClasses
this approach works, but it hinders when wanting to get an overview,
which libraries are included and licence-information+resources are
spread around everywhere. that's when working with external libraries i
think the best is to include it as a encapsulated jar like:
mainBundleJar:
-own/classes
-externalLibrary1.jar
-externalLibrary2.jar
-META-INF/<ManifestTellingToIncludeEncapsulatedJarsToClasspath.mf>
i know with standard classLoader this encapsulated jars are not
supported, but through a custom classLoader (as OSGI uses its own, too)
this could be done.
so is it possible to provide inner jars with maven-bundle-plugin or does
this layout not conform to OSGI spec anyway, so cannot be implemented?
thanks.
--
manuel aldana
aldana@gmx.de
www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-bundle-plugin: encapsulate-jar vs. deep-extract
Posted by Stuart McCulloch <st...@jayway.net>.
On 11/09/2007, aldana@gmx.de <al...@gmx.de> wrote:
>
> i forgot to reset <Private-Package>*</Private-Package>. this way
> depedency got included twice.
>
> hence using <Embed-Dependency> does not influence <Private-Package>
> property.
that's correct: Embed-Dependency is merely a way to dynamically generate
the relevant Include-Resource and Bundle-ClassPath entries to pass to Bnd
so it can embed maven jar artifacts inside a bundle.
( the reason it's done this way instead of inside Bnd is because the Bnd
tool
has no knowledge of maven dependencies... in fact it can be used with ant
and even as an eclipse plugin )
--
> manuel aldana
> aldana@gmx.de
> homepage: www.aldana-online.de
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
--
Cheers, Stuart
Re: maven-bundle-plugin: encapsulate-jar vs. deep-extract
Posted by "aldana@gmx.de" <al...@gmx.de>.
aldana@gmx.de schrieb:
> aldana@gmx.de schrieb:
>> hi,
>>
>> when building a bundle dependency-jars get extracted and class files
>> get copied respective to package structure
>>
>> mainBundleJar:
>> -own/classes
>> -external/libClasses
>>
>> this approach works, but it hinders when wanting to get an overview,
>> which libraries are included and licence-information+resources are
>> spread around everywhere. that's when working with external
>> libraries i think the best is to include it as a encapsulated jar like:
>>
>> mainBundleJar:
>> -own/classes
>> -externalLibrary1.jar
>> -externalLibrary2.jar
>> -META-INF/<ManifestTellingToIncludeEncapsulatedJarsToClasspath.mf>
>>
>> i know with standard classLoader this encapsulated jars are not
>> supported, but through a custom classLoader (as OSGI uses its own,
>> too) this could be done.
>> so is it possible to provide inner jars with maven-bundle-plugin or
>> does this layout not conform to OSGI spec anyway, so cannot be
>> implemented?
> it seems that i got the option to enable (inline has to be set to false):
> <Embed-Dependency>*;groupId=!org.eclipse.equinox;inline=false</Embed-Dependency>
>
>
> this way dependencies are included as jars.
>
> but this still does not work completely because the classes still get
> extracted and inlined. so i end up with classes getting extracted and
> jar-bundles to be placed too. or do i misunderstand the semantics
> behind inline property?
>
error again on my side...
i forgot to reset <Private-Package>*</Private-Package>. this way
depedency got included twice.
hence using <Embed-Dependency> does not influence <Private-Package>
property.
--
manuel aldana
aldana@gmx.de
homepage: www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: maven-bundle-plugin: encapsulate-jar vs. deep-extract
Posted by "aldana@gmx.de" <al...@gmx.de>.
aldana@gmx.de schrieb:
> hi,
>
> when building a bundle dependency-jars get extracted and class files
> get copied respective to package structure
>
> mainBundleJar:
> -own/classes
> -external/libClasses
>
> this approach works, but it hinders when wanting to get an overview,
> which libraries are included and licence-information+resources are
> spread around everywhere. that's when working with external libraries
> i think the best is to include it as a encapsulated jar like:
>
> mainBundleJar:
> -own/classes
> -externalLibrary1.jar
> -externalLibrary2.jar
> -META-INF/<ManifestTellingToIncludeEncapsulatedJarsToClasspath.mf>
>
> i know with standard classLoader this encapsulated jars are not
> supported, but through a custom classLoader (as OSGI uses its own,
> too) this could be done.
> so is it possible to provide inner jars with maven-bundle-plugin or
> does this layout not conform to OSGI spec anyway, so cannot be
> implemented?
it seems that i got the option to enable (inline has to be set to false):
<Embed-Dependency>*;groupId=!org.eclipse.equinox;inline=false</Embed-Dependency>
this way dependencies are included as jars.
but this still does not work completely because the classes still get
extracted and inlined. so i end up with classes getting extracted and
jar-bundles to be placed too. or do i misunderstand the semantics behind
inline property?
--
manuel aldana
aldana@gmx.de
homepage: www.aldana-online.de
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org