[
https://issues.apache.org/jira/browse/MDEP-804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17530551#comment-17530551
]
Henning Schmiedehausen commented on MDEP-804:
---------------------------------------------
Very much agreed. That is why I opened a PR and a ticket. I feel that
discussing use cases is valuable. This PR is mostly a reaction to the behavior
changes from 3.1.x -> 3.2.0. A flag allows us to transition to the newer plugin
versions with much less pain than using excludes.
I hope you understand the use case (flags can be driven out of properties,
lists can not) and why this is still beneficial.
Personally, I don't mind lots of flags; the problem is that they often could be
documented better and their interaction is sometimes undefined. I hope I
documented this new flag sufficiently.
> Allow auto-ignore of all non-test scoped dependencies used only in test scope
> -----------------------------------------------------------------------------
>
> Key: MDEP-804
> URL: https://issues.apache.org/jira/browse/MDEP-804
> Project: Maven Dependency Plugin
> Issue Type: New Feature
> Components: analyze
> Affects Versions: 3.3.0
> Reporter: Henning Schmiedehausen
> Priority: Major
> Labels: pull-request-available
> Fix For: wontfix-candidate
>
>
> Pre-3.2.0, dependencies that were used only in test scope but not declared in
> test scope (most likely declared in compile scope) were accepted by the
> plugin and not flagged as a problem.
> Starting with 3.2.0 (and the current 3.3.0), these are reported with
> "Non-test scoped test only dependencies found". If the scope of the
> dependencies can not be changed (there are many reasons for that in large
> projects), the old behavior can be restored by adding each flagged dependency
> to the "ignoredNonTestScopedDependencies" configuration option in the
> respective project.
> This is, especially in large projects, cumbersome and brittle.
> There should be a boolean flag, "ignoreAllNonTestScoped" that, when set,
> allows ignoring non-test scoped dependencies if they are used only in test
> scope. This flag restores the pre-3.2.0 behavior.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)