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

banDuplicatePomDependencyVersions does not check managementDependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.0-M1
    • 3.0.0
    • Standard Rules
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: