You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Delany (Jira)" <ji...@apache.org> on 2022/10/07 07:38:00 UTC

[jira] [Created] (MDEP-829) excludes filter should function like exclusions

Delany created MDEP-829:
---------------------------

             Summary: 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


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)