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

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.0-beta-4
    • None
    • prepare
    • Maven 2.0.4 under windows
    • 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. MRELEASE-161.patch
          0.8 kB
          Reimo Daum
        2. multipleArtifacts.patch
          3 kB
          Sébastien Cesbron
        3. release-test.zip
          14 kB
          Chris Wewerka

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              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