felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall" <he...@ungoverned.org>
Subject Re: Is it possible to <Include-Resource> from a jar file?
Date Sat, 10 Feb 2007 14:42:09 GMT
Tim,

Perhaps the wiki needs to be updated, because it looks like this might 
have changed since it was created, but check the web page for BND, it 
seems like it says it does what you want.

    http://www.aqute.biz/Code/Bnd

-> richard

Tim Moloney wrote:
> Tim Moloney wrote:
>> Tim Moloney wrote:
>>> I'd like to include resources from a jar file that I'm repackaging 
>>> as a bundle.  The documentation for maven-bundle-plugin state that 
>>> an entire jar can be inlined or single files outside a jar can be 
>>> included in the resulting bundle.  What I'd like to do is include 
>>> single files from a jar (e.g., LICENSE.txt).
>>>
>>> If this functionality isn't there now, could it be implemented?  
>>> Something like the following would be so convenient.
>>>
>>> <Include-Resource>
>>>  @foo.jar/META-INF/LICENSE.txt,
>>>  @foo.jar/META-INF/NOTICE.txt
>>> </Include-Resource>
>>>
>>> Thanks,
>>>  Tim
>>
>> I was able to get the result that I needed by using the following.
>>
>> <Include-Resource>
>>  @foo.jar
>> <Include-Resource>
>>
>> Unfortunately, this requires copying the jar file to the project 
>> directory (which I don't know how to do in maven).  I guess the 
>> "@foo.jar/path/to/file" syntax originally suggested would have to 
>> find foo.jar in the classpath.
>>
>> Thanks,
>>  Tim
>
>
> Considering there could be multiple files with the same name in 
> different jars, then the syntax really should be something like:
>
> <Include-Resource>
>  META-INF/LICENSE-foo.txt=@foo.jar/META-INF/LICENSE.txt,
>  META-INF/LICENSE-bar.txt=@bar.jar/META-INF/LICENSE.txt
> </Include-Resource>
>
> Tim
>

Mime
View raw message