[ 
https://issues.apache.org/jira/browse/MDEP-829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17613933#comment-17613933
 ] 

Delany edited comment on MDEP-829 at 10/7/22 7:48 AM:
------------------------------------------------------

Ok, I see in the last example on the page the use of excludes has some use 
together with includes to remove snapshots from the output. But this is so 
fringe case and could rather be accomplished with a negative glob filter which 
better describes the intent 
{code:java}
-Dincludes=org.codehaus.plexus:::!(*-SNAPSHOT) {code}


was (Author: delany):
Ok, I see in the last example on the page the use of excludes has some use 
together with includes to remove snapshots from the output. But this is so 
fringe case and could rather be accomplished with a negative glob filter which 
better describes the intent
-Dincludes=org.codehaus.plexus:::!(*-SNAPSHOT)
 

> excludes filter should function like exclusions
> -----------------------------------------------
>
>                 Key: MDEP-829
>                 URL: https://issues.apache.org/jira/browse/MDEP-829
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: tree
>    Affects Versions: 3.3.0
>            Reporter: Delany
>            Priority: Major
>
> The -Dincludes parameter causes the tree goal to filter the resultant 
> dependency tree: it returns matching dependencies {*}and their parents{*}.
> The -Dexcludes parameter uses the same logic, but returns non-matching 
> dependencies {*}and their parents{*}. Why would anyone want this? Rather, 
> excludes should remove matching dependencies from the initial dependency 
> model (like dependency exclusions do), not just the resultant tree.
> Include is demonstrated at 
> [https://maven.apache.org/plugins/maven-dependency-plugin/examples/filtering-the-dependency-tree.html],
>  but not exclude.
> If run the given exclude command
> {code:java}
> mvn dependency:tree -Dexcludes=org.codehaus.plexus{code}
> on the following tree
> {noformat}
> [INFO] 
> org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0-alpha-5-SNAPSHOT
> [INFO] \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:compile
> [INFO]    \- org.codehaus.plexus:plexus-velocity:jar:1.1.3:compile
> [INFO]       \- velocity:velocity:jar:1.4:compile{noformat}
> the output is the same, since the velocity dependency needs to show its 
> parent in the tree. This is pointless. Why would I only want to exclude the 
> "leaves" of the tree?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to