You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MENFORCER-424] Maven enforcer rule which checks that all dependencies in dependencyManagement don't have an explicit scope set #542
Setting the scope in the dependencyManagement is an anti-pattern and may lead to surprising results during classpath creation. Compare also with the discussion in apache/maven-apache-parent#63 (comment).
I propose to add a new rule with name banDependencyManagementScope.
Probably scope import should be accepted though, because it is a special case.
Issue Links:
SLING-11411 Remove scope from dependency management
Right, so probably such a rule needs a way to allow certain dependencies to have their scope managed. But what about the rule in general, would you accept a PR for adding it to the standard rules?
Activity
jira-importer commentedon Jun 26, 2022
Slawomir Jaranowski commented
One case when I use scope in
dependencyManagementis when I want to change scope for transitive dependency.jira-importer commentedon Jun 27, 2022
Konrad Windszus commented
Right, so probably such a rule needs a way to allow certain dependencies to have their scope managed. But what about the rule in general, would you accept a PR for adding it to the standard rules?
jira-importer commentedon Jun 27, 2022
Slawomir Jaranowski commented
For me ok.
jira-importer commentedon Jul 1, 2022
Konrad Windszus commented
I provided a PR in #169. sjaranowski Do you have time to review?
jira-importer commentedon Jul 29, 2022
Slawomir Jaranowski commented
we have many build-in rules for dependency management, so I think we can add one more
Â