You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/06/01 20:49:31 UTC

[maven-dependency-plugin] branch MDEP-714 created (now 5cf9185)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MDEP-714
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git.


      at 5cf9185  [MDEP-714] Add analyze parameter "ignoreUnusedRuntime"

This branch includes the following new commits:

     new 5cf9185  [MDEP-714] Add analyze parameter "ignoreUnusedRuntime"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[maven-dependency-plugin] 01/01: [MDEP-714] Add analyze parameter "ignoreUnusedRuntime"

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MDEP-714
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 5cf91852ecb033054815d61bfd2e5ca06df659da
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Tue Jun 1 22:47:48 2021 +0200

    [MDEP-714] Add analyze parameter "ignoreUnusedRuntime"
---
 .../apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
index 0f735ae..45ef41c 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/analyze/AbstractAnalyzeMojo.java
@@ -329,6 +329,11 @@ public abstract class AbstractAnalyzeMojo
 
         Set<Artifact> ignoredUsedUndeclared = new LinkedHashSet<>();
         Set<Artifact> ignoredUnusedDeclared = new LinkedHashSet<>();
+        
+        if ( ignoreUnusedRuntime )
+        {
+            filterArtifactsByScope( unusedDeclared, Artifact.SCOPE_RUNTIME );
+        }
 
         if ( ignoreUnusedRuntime )
         {