You are correct. The "inline" format rule describes my first suggestion
(with the addition of the "!" separator between the jar file name and
the path inside the jar file).
However, the resource file is copied with the same path, no renaming or
relocating. The "assignment" format rule (which allows
renaming/relocating) doesn't work for jar files. This probably isn't a
big deal since it is not likely to be needed very often.
Unfortunately, I still have to manually copy the jar file from the maven
repository to the maven project directory for the "inline" rule to
work. Is there a way to make the maven-bundle-plugin find the jar file
in the maven repository? A second solution would be to automate copying
the jar file from the repository to the project directory. Automating
the copy may be possible now in maven, but I haven't been able to figure
out how.
Tim
Richard S. Hall wrote:
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/[EMAIL PROTECTED]/META-INF/LICENSE.txt,
META-INF/[EMAIL PROTECTED]/META-INF/LICENSE.txt
</Include-Resource>
Tim