[MDEP-927] dependency:tree excludes parameter does not work
Seva Popov opened MDEP-927 and commented
The dependency:tree excludes parameter does not work in any plugin version available for download.
Ex.:
mvn org.apache.maven.plugins:maven-dependency-plugin:3.6.1:tree -s ~/.m2/settings.xml -Dexcludes=javax:javaee-api:jar:8.0.1 | grep javax.javaee
[INFO] +- javax:javaee-api:jar:8.0.1:provided
According to the documentation the dependency should have been excluded - https://maven.apache.org/plugins/maven-dependency-plugin/tree-mojo.html#excludes
Affects: 3.6.1
Kariem Hussein commented
I have a similar problem and tried to describe it in this question on Stack Overflow.
Steps to reproduce
- Check out spring-ws, at version 4.0.11
- Change to directory
spring-ws-core - Run
treegoal with scope filtered toruntime
mvn dependency:tree -Dscope=runtime
- Filter the output to exclude
org.glassfish.jaxb:jaxb-runtime:jar:4.0.5
mvn dependency:tree -Dscope=runtime -Dexcludes=org.glassfish.jaxb:jaxb-runtime
→ The dependency is still included in the output, although it should have been filtered.
Filtering on jakarta.mail-api works witout problems
I have also tried this with version 3.8.0 of the plugin
mvn org.apache.maven.plugins:maven-dependency-plugin:3.8.0:tree ...
Also, I can reproduce the problem in version 2.8, which is the one implicitly used when running inside of spring-ws.