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

Resolved dependencies overwritten when multiple subprojects with SNAPSHOT dependencies are released

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • perform
    • None
    • Patch

    Description

      The CheckDependencySnapshotsPhase does not properly maintain the Set of resolvedDependencies when there are multiple sub projects that have SNAPSHOT deps.

      Given subproject one defines a snapshot on artifactId:

      <project>
          ...
          <dependency>
            <groupId>external</groupId>
            <artifactId>artifactId</artifactId>
            <version>1.0-SNAPSHOT</version>
          </dependency>
          ...
      </project>
      

      Given subproject two defines a snapshot on artifactId2:

      <project>
          ...
          <dependency>
            <groupId>external</groupId>
            <artifactId>artifactId2</artifactId>
            <version>1.0-SNAPSHOT</version>
          </dependency>
          ...
      </project>
      

      And you run

      release:perform

      on the parent project and resolve the snaps, I think you should expect the ReleaseDescriptor.getResolvedSnapshotDependencies() to contain two entries:

      • groupId:artifactId
      • groupId:artifactId2

      But instead it only contains the most recently resolved dependency.

      Attachments

        1. Fix.patch
          1 kB
          Elliot Metsger
        2. Testcase.patch
          9 kB
          Elliot Metsger

        Issue Links

          Activity

            People

              brett Brett Porter
              emetsger Elliot Metsger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: