From 76d59f0ffe8ab02757cb9c9d131004b6145a7ceb Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 14 Feb 2022 00:14:57 +0100 Subject: [PATCH] [MDEP-789] Improve documentation of analyze - Non-test scoped --- .../dependency/analyze/AbstractAnalyzeMojo.java | 4 +++- ...-dependencies-from-dependency-analysis.apt.vm | 16 +++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) 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 23c58f210c..41d853f38e 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 @@ -98,6 +98,8 @@ public abstract class AbstractAnalyzeMojo /** * Ignore Runtime/Provided/Test/System scopes for unused dependency analysis. + * + * Non-test scoped list will be not affected. */ @Parameter( property = "ignoreNonCompile", defaultValue = "false" ) private boolean ignoreNonCompile; @@ -167,7 +169,7 @@ public abstract class AbstractAnalyzeMojo /** * List of dependencies that will be ignored. Any dependency on this list will be excluded from the "declared but - * unused" and the "used but undeclared" list. The filter syntax is: + * unused", the "used but undeclared", and the "non-test scoped" list. The filter syntax is: * *
      * [groupId]:[artifactId]:[type]:[version]
diff --git a/src/site/apt/examples/exclude-dependencies-from-dependency-analysis.apt.vm b/src/site/apt/examples/exclude-dependencies-from-dependency-analysis.apt.vm
index fa04f0774c..706127f14c 100644
--- a/src/site/apt/examples/exclude-dependencies-from-dependency-analysis.apt.vm
+++ b/src/site/apt/examples/exclude-dependencies-from-dependency-analysis.apt.vm
@@ -34,10 +34,11 @@ Exclude dependencies from dependency analysis
   that contain annotations and the byte code analysis is unable to
   determine whether a jar is actually required or not.
 
-  The plugin can then be configured to ignore these dependencies in
-  either "declared but unused" or "undeclared but used" case or in
-  both simultaneously.  See the following POM configuration for an
-  example:
+  The plugin can then be configured to ignore dependencies that are
+  "declared but unused", "undeclared but used", and "non-test scoped"
+  in selected list or in all simultaneously.
+
+  See the following POM configuration for an example:
 
 +---+
 
@@ -57,7 +58,7 @@ Exclude dependencies from dependency analysis
             
               true
 
-              
+              
               
                 com.google.code.findbugs:jsr305
               
@@ -71,6 +72,11 @@ Exclude dependencies from dependency analysis
               
                 com.google.code.findbugs:annotations
               
+
+              
+              
+                com.google.code.findbugs:annotations
+