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

banDuplicatePomDependencyVersions does not check managementDependencies

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          Activity

            People

            • Assignee:
              slachiewicz Sylwester Lachiewicz
              Reporter:
              akudrevatych Alexander Kudrevatykh

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment