Skip to content

Unable to use includeresources with pattern on path #6795

@reckart

Description

@reckart

I would like to create a JAR file using bnd that contains no classes and only some explicitly defined resources that reside in certain paths using the bnd-maven-plugin.

I have been able to get it work for simple filename based patterns like (#6794 (comment))

        <configuration>
          <includeClassesDir>false</includeClassesDir>
          <bnd>
          -includeresource: /=src/main/resources/;filter:="*.json"
          </bnd>
        </configuration>

But it does not seem to work for matching paths, e.g.

          -includeresource: /=src/main/resources/;filter:="**/*.json"

          -includeresource: /=src/main/resources/;filter:="*/data/*"

          -includeresource: /=src/main/resources/;filter:="**/data/**"

If I read the source correctly, then it is not possible to use includeresources with a pattern to match a path:

https://github.com/bndtools/bnd/blob/master/biz.aQute.bndlib/src/aQute/bnd/osgi/Instruction.java#L33-L48

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions