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

banDuplicatePomDependencyVersions does not check managementDependencies

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-M1
    • Fix Version/s: 3.0.0
    • Component/s: Standard Rules
    • Labels:
      None

      Description

      MENFORCER-152 added rule for ban duplicate depndencies, but dependencyManagement section does not checked correctly
      codeĀ 

       if ( model.getDependencyManagement() != null ) 
      {
          List<Dependency> managementDependencies = model.getDependencies();
          Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );

      should be written as

      if ( model.getDependencyManagement() != null ) 
      {
          List<Dependency> managementDependencies = model.getDependencyManagement().getDependencies();
          Map<String, Integer> duplicateManagementDependencies = validateDependencies( managementDependencies );

      and same fix should be applied to

      profiles

      checking code

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                slachiewicz Sylwester Lachiewicz
                Reporter:
                akudrevatych Alexander Kudrevatykh
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: