From 5184b94c991108341e4642f53cba9cd617410cf5 Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Wed, 9 Oct 2024 08:41:20 -0400 Subject: [PATCH] [MDEP-957] By default, don't report slf4j-simple as unused --- .../dependency/analyze/AbstractAnalyzeMojo.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 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 35b287ec1..b1f63ee1c 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 @@ -228,11 +228,15 @@ public abstract class AbstractAnalyzeMojo extends AbstractMojo { * For example, org.apache.* will match all artifacts whose group id starts with * org.apache., and :::*-SNAPSHOT will match all snapshot artifacts. *

+ *

+ * By default, org.slf4j:slf4j-simple is ignored. Setting this property to an empty list + * will allow it to be detected. + *

* * @since 2.10 */ @Parameter - private String[] ignoredUnusedDeclaredDependencies = new String[0]; + private String[] ignoredUnusedDeclaredDependencies = {"org.slf4j:slf4j-simple::"}; /** * List of dependencies that will be ignored if they are in not test scope but are only used in test classes. @@ -248,11 +252,15 @@ public abstract class AbstractAnalyzeMojo extends AbstractMojo { * For example, org.apache.* will match all artifacts whose group id starts with * org.apache., and :::*-SNAPSHOT will match all snapshot artifacts. *

+ *

+ * By default, org.slf4j:slf4j-simple is ignored. Setting this property to an empty list + * will allow it to be detected. + *

* * @since 3.3.0 */ @Parameter - private String[] ignoredNonTestScopedDependencies = new String[0]; + private String[] ignoredNonTestScopedDependencies = {"org.slf4j:slf4j-simple::"}; /** * List of project packaging that will be ignored.