I am moving from maven-bundle-plugin which provided the "convenient" configuration using Embed-Dependency, but it appears i need to specify my Embed Dependency "manually" in bnd format when using the bnd-maven-plugin
. I added the same bundle headers from my old package, but it doesn't seem to be including the actual dependency's jar file. Does someone have a quick/concise how-to do this?
bnd has an instruction -includeresource
defined here https://bnd.bndtools.org/instructions/includeresource.html:
Here's an example:
-includeresource: lib/somelib.jar=somelib-[\w.]*.jar;lib:=true
This should have visibility into all the dependencies in the classpath used to build the artifact and matches on the file name of the associated files.
[Update with BJ's comment]
The lib:=true
will automatically add the jar to the bundle's Bundle-ClassPath header in a merge safe way (i.e. by making sure it plays nice with existing content or non-existent value).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With