You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Roy van Rijn (Jira)" <ji...@apache.org> on 2020/07/29 10:00:22 UTC
[jira] [Commented] (MENFORCER-256) BannedDependencies does not work
with wildcard strings
[ https://issues.apache.org/jira/browse/MENFORCER-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17167096#comment-17167096 ]
Roy van Rijn commented on MENFORCER-256:
----------------------------------------
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)