Skip to content

Commit

Permalink
[MDEP-957] By default, don't report slf4j-simple as unused (#433)
Browse files Browse the repository at this point in the history
* [MDEP-957] By default, don't report slf4j-simple as unused
  • Loading branch information
elharo authored Oct 18, 2024
1 parent cc3ed0f commit 6da7a1d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions src/it/projects/analyze/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
<artifactId>maven-model</artifactId>
<version>2.0.6</version>
</dependency>
<!-- MDEP-957 slf4j-simple is unused but should not be reported -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.16</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public abstract class AbstractAnalyzeMojo extends AbstractMojo {
private String[] ignoredUsedUndeclaredDependencies = new String[0];

/**
* List of dependencies that will be ignored if they are declared but unused. The filter syntax is:
* List of dependencies that are ignored if they are declared but unused. The filter syntax is:
*
* <pre>
* [groupId]:[artifactId]:[type]:[version]
Expand All @@ -225,17 +225,17 @@ public abstract class AbstractAnalyzeMojo extends AbstractMojo {
* where each pattern segment is optional and supports full and partial <code>*</code> wildcards. An empty pattern
* segment is treated as an implicit wildcard. *
* <p>
* For example, <code>org.apache.*</code> will match all artifacts whose group id starts with
* For example, <code>org.apache.*</code> matches all artifacts whose group id starts with
* <code>org.apache.</code>, and <code>:::*-SNAPSHOT</code> will match all snapshot artifacts.
* </p>
*
* @since 2.10
*/
@Parameter
private String[] ignoredUnusedDeclaredDependencies = new String[0];
@Parameter(defaultValue = "org.slf4j:slf4j-simple::")
private String[] ignoredUnusedDeclaredDependencies;

/**
* List of dependencies that will be ignored if they are in not test scope but are only used in test classes.
* List of dependencies that are ignored if they are in not test scope but are only used in test classes.
* The filter syntax is:
*
* <pre>
Expand All @@ -245,14 +245,14 @@ public abstract class AbstractAnalyzeMojo extends AbstractMojo {
* where each pattern segment is optional and supports full and partial <code>*</code> wildcards. An empty pattern
* segment is treated as an implicit wildcard. *
* <p>
* For example, <code>org.apache.*</code> will match all artifacts whose group id starts with
* For example, <code>org.apache.*</code> matched all artifacts whose group id starts with
* <code>org.apache.</code>, and <code>:::*-SNAPSHOT</code> will match all snapshot artifacts.
* </p>
*
* @since 3.3.0
*/
@Parameter
private String[] ignoredNonTestScopedDependencies = new String[0];
@Parameter(defaultValue = "org.slf4j:slf4j-simple::")
private String[] ignoredNonTestScopedDependencies;

/**
* List of project packaging that will be ignored.
Expand Down

0 comments on commit 6da7a1d

Please sign in to comment.