Uploaded image for project: 'Maven Enforcer Plugin'
  1. Maven Enforcer Plugin
  2. MENFORCER-424

Maven enforcer rule which checks that all dependencies in dependencyManagement don't have an explicit scope set

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.2.0, 3.2.1
    • Standard Rules
    • None

    Description

      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 https://github.com/apache/maven-apache-parent/pull/63#discussion_r788361219.

      I propose to add a new rule with name banDependencyManagementScope.

      Probably scope import should be accepted though, because it is a special case.

      Attachments

        Issue Links

          Activity

            People

              sjaranowski Slawomir Jaranowski
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: