-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MDEP-957] By default, don't report slf4j-simple as unused #433
Conversation
* | ||
* @since 2.10 | ||
*/ | ||
@Parameter | ||
private String[] ignoredUnusedDeclaredDependencies = new String[0]; | ||
private String[] ignoredUnusedDeclaredDependencies = {"org.slf4j:slf4j-simple::"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- why not use a
default
option of parameter? - when user defined another ignores list it will be overridden ... maybe we need add it latter to be always ignored ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little later in the file I see this comment
// defaultValue value on @Parameter - not work with Maven 3.2.5
// When is set defaultValue always win, and there is no possibility to override by plugin configuration.
* By default, org.slf4j:slf4j-simple is ignored. Setting this property to an empty list | ||
* will allow it to be detected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also setting to something else will detect slf4j-simple again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took this comment out. The doc generator will pick up the default value here and document it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objection. @slawekjaranowski?
slf4j-simple is a super common "unused" dependency because when slfj-api or slf4j-impl is included and slf4j-simple isn't, the application works just fine but prints an annoying log message to the console telling developers to add it.
or
so devs deliberately add slf4j-simple to their dependencies just to shut up these warnings.
see https://www.slf4j.org/manual.html