[ https://issues.apache.org/jira/browse/MENFORCER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167096#comment-17167096 ]
Roy van Rijn edited comment on MENFORCER-256 at 7/29/20, 10:01 AM: ------------------------------------------------------------------- I've revisted and tested this issue, with newer Maven version (3.6.3) this isn't a problem, for example: {noformat} <dependency> <groupId>io.micronaut</groupId> <artifactId>micronaut-http-server</artifactId> <version>2.0.1</version> </dependency> {noformat} And using the partial wildcard: {noformat} <excludes> <exclude>io.micronaut:micronaut-http-*</exclude> </excludes> {noformat} This is marked as exclusion, as expected: {noformat} Found Banned Dependency: io.micronaut:micronaut-http-server:jar:2.0.1 {noformat} It seems this issue is no longer relevant and can be closed. was (Author: royvanrijn): I've revisted and tested this issue, with newer Maven version (3.6.3) this isn't a problem, for example: ``` <dependency> <groupId>io.micronaut</groupId> <artifactId>micronaut-http-server</artifactId> <version>2.0.1</version> </dependency> ``` And using the partial wildcard: ``` <excludes> <exclude>io.micronaut:micronaut-http-*</exclude> </excludes> ``` This is marked as exclusion, as expected: ``` Found Banned Dependency: io.micronaut:micronaut-http-server:jar:2.0.1 ``` It seems this issue is no longer relevant and can be closed. > BannedDependencies does not work with wildcard strings > ------------------------------------------------------ > > Key: MENFORCER-256 > URL: https://issues.apache.org/jira/browse/MENFORCER-256 > Project: Maven Enforcer Plugin > Issue Type: Bug > Affects Versions: 1.4 > Reporter: Dariusz Kordonski > Priority: Major > > Wildcards mixed with strings don't seem to work with BannedDependencies, > despite being documented as a valid exclusion pattern here: > http://maven.apache.org/enforcer/enforcer-rules/bannedDependencies.html. > Pure wildcards (for the entire component) seem to work, though. E.g. both > excludes below will work (exact match, pure wildcard): > {code} > <excludes> > <exclude>com.atlassian.plugins:atlassian-plugins-core</exclude> > </excludes> > {code} > {code} > <excludes> > <exclude>com.atlassian.plugins:*</exclude> > </excludes> > {code} > But the following will not be detected (mixed string and wildcards), despite > being documented as a valid exclusion pattern: > {code} > <excludes> > <exclude>com.atlassian.plugins:atlassian-plugins-*</exclude> > </excludes> > {code} > We are using version 1.4.0 -- This message was sent by Atlassian Jira (v8.3.4#803005)