Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-161

If there is more than one artifact with the same artifactId in dependencyManagement only the first one is updated

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.0-beta-4
    • Fix Version/s: None
    • Component/s: prepare
    • Labels:
    • Environment:
      Maven 2.0.4 under windows
    • Flags:
      Patch

      Description

      I have a multi module project. When I do release:prepare, the release plugin update the version tag of all my submodules in the dependencyManagement section.
      For the same module I have declared two artifacts like this :

      <dependency>
        <groupId>com.bla</groupId>
        <artifactId>blabla</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.bla</groupId>
        <artifactId>blabla</artifactId>
        <version>1.0-SNAPSHOT</version>
      </dependency>
      

      In this case, the release plugin only update the first dependency.

      This is due to element search in the "updateDomVersion" method of the AbstractRewritePomsPhase class. I've attached a patch to solve the problem. I don't know if this is the right way to do. I change all the artifacts in the same pass. I don't take car of different type/classifier

        Attachments

        1. multipleArtifacts.patch
          3 kB
          Sébastien Cesbron
        2. release-test.zip
          14 kB
          Chris Wewerka
        3. MRELEASE-161.patch
          0.8 kB
          Reimo Daum

          Issue Links

            Activity

              People

              • Assignee:
                rfscholte Robert Scholte
                Reporter:
                scesbron Sébastien Cesbron
              • Votes:
                10 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m