Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
maven-bundle-plugin-1.2.0
-
None
Description
When using <Embed-Dependency> maven bundle plugin adds the necessary entries to Include-Resource bnd instruction. This entries are added by appending them to the end of Include-Resource string. This works fine by most of the cases but this will not allow an override of bundle resources due to the fact that the Include-Resource entries will be processed in the order specified so if I include a resource that exists also in the inlined dependencies, the resource will be overridden by the one in the dependency.
E.g.
I have a dependency (jar) that includes a class such as foo/Bar.class. Now if I want to override that class by my own I can do that by adding something like:
Include-Resource: foo/Bar.class=target/classes/foo/Bar.class. But when I use the Embed dependency my specified Bar.class will be overridden by the one in the dependency.
To be able to do this I suggest to use the same way of working as for
{maven-resources}, let's say
{maven-dependencies} that is expanded automatically to the necessary embed dependency entries. And to be compatible with current implementation in the placeholder {maven-dependencies}is not present then append it to the end of Include-Resource (as till now).
In this way I can do something like Include-Resource:
{maven-dependencies}, foo/Bar.class=target/classes/foo/Bar.class.