Uploaded image for project: 'Felix'
  1. Felix
  2. FELIX-472

Embed-Dependency, Include-Resource and inline

    XMLWordPrintableJSON

Details

    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.

      Attachments

        Activity

          People

            mcculls Stuart McCulloch
            adreghiciu Alin George Dreghiciu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: