bnd icon indicating copy to clipboard operation
bnd copied to clipboard

Unable to exclude directory from includeresource using filter

Open reckart opened this issue 3 months ago • 0 comments

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.

reckart avatar Sep 04 '25 07:09 reckart