Stuart McCulloch pisze:
> 2009/5/6 Antoni Mylka <[email protected]>
> 
>> 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
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to