Skip to content

Unable to exclude directory from includeresource using filter #6796

@reckart

Description

@reckart

It seems not possible to exclude a directory using a filter on includeresources:

-includeresource: /=src/main/resources/;filter:=!logs

logs is a folder in this example.

The problem seems to be the order of condition evaluations here:

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

It always returns true when encountering a directory and recursion is enabled without consulting the matcher.

A possible workaround is using donotcopy because that is evaluated first.
However, IMHO that should not be necessary to have to resort to that.

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