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

    • 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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment