You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Antoni Mylka <an...@poczta.onet.pl> on 2009/05/06 13:23:56 UTC
Including META-INF subfolders in a bundle
Hello,
I'm using the maven-bundle-plugin to create a bundle that includes
classes from about 40 different jars. It's all very well, but some of
the jars have a META-INF/services folder containing some extra metadata.
I'd like the content of META-INF/services folders of all dependencies to
be combined into a META-INF/services folder of my resulting bundle.
Is there a way to accomplish this with felix maven plugin by itself,
without the aid of assembly plugin?
Antoni Mylka
antoni.mylka@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Including META-INF subfolders in a bundle
Posted by Antoni Mylka <an...@poczta.onet.pl>.
Stuart McCulloch pisze:
> 2009/5/6 Antoni Mylka <an...@poczta.onet.pl>
>
>> Hello,
>>
>> I'm using the maven-bundle-plugin to create a bundle that includes
>> classes from about 40 different jars. It's all very well, but some of
>> the jars have a META-INF/services folder containing some extra metadata.
>> I'd like the content of META-INF/services folders of all dependencies to
>> be combined into a META-INF/services folder of my resulting bundle.
>>
>> Is there a way to accomplish this with felix maven plugin by itself,
>> without the aid of assembly plugin?
>>
>
> you could use:
>
> <Embed-Dependency>*;inline=true</Embed-Dependency>
>
> which calculates the right Include-Resource instruction to inline all
> dependencies
> into the final bundle - this would include the contents of
> META-INF/services, etc.
>
> you can also filter which resources get embedded, for example:
>
> <Embed-Dependency>*;inline=META-INF/services/**</Embed-Dependency>
>
> or you could use:
>
> <Private-Package>META-INF.*</Private-Package>
>
> which does the same sort of merging, but using package names rather than
> paths
>
> [ http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html ]
>
Thanks for your help. The Private-Package way wasn't the way to go
because it included files from jars outside my project. The way to go was:
<Embed-Transitive>true</Embed-Transitive>
<Embed-Dependency>*;scope=compile|runtime;groupId=org.openrdf.sesame;inline=META-INF/services/*</Embed-Dependency>
It took me a while to spot that I can filter the jars by groupId and
that I have to set Embed-Transitive to true. Hooray for felix! It seems
that if everything else fails it might not be a bad idea to read the
manual, which is great BTW :).
Anyway, thanks very much. You saved my day.
Antoni Mylka
antoni.mylka@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Including META-INF subfolders in a bundle
Posted by Stuart McCulloch <mc...@gmail.com>.
2009/5/6 Antoni Mylka <an...@poczta.onet.pl>
> Hello,
>
> I'm using the maven-bundle-plugin to create a bundle that includes
> classes from about 40 different jars. It's all very well, but some of
> the jars have a META-INF/services folder containing some extra metadata.
> I'd like the content of META-INF/services folders of all dependencies to
> be combined into a META-INF/services folder of my resulting bundle.
>
> Is there a way to accomplish this with felix maven plugin by itself,
> without the aid of assembly plugin?
>
you could use:
<Embed-Dependency>*;inline=true</Embed-Dependency>
which calculates the right Include-Resource instruction to inline all
dependencies
into the final bundle - this would include the contents of
META-INF/services, etc.
you can also filter which resources get embedded, for example:
<Embed-Dependency>*;inline=META-INF/services/**</Embed-Dependency>
or you could use:
<Private-Package>META-INF.*</Private-Package>
which does the same sort of merging, but using package names rather than
paths
[ http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html ]
Antoni Mylka
> antoni.mylka@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>
--
Cheers, Stuart