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

Improve snapshot dependency handling of parent artifacts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.0
    • None
    • prepare
    • None
    • Patch

    Description

      This builds on the patch in MRELEASE-583, where the user is prompted for the release version of snapshot dependencies.

      However, when the snapshot dependency to be resolved is the parent artifact of the project being released, the version supplied by the user is not used in the transformed release version of the pom.

      For example, I want to release the following:

      <project>
        <groupId>org.dataconservancy</groupId>
        <artifactId>project-pom</artifactId>
        <version>1.0.0-SNAPSHOT</version>
      
        <parent>
          <groupId>org.dataconservancy</groupId>
          <artifactId>parent-pom</artifactId>
          <version>1.0.0-SNAPSHOT</version>
        </parent>
      
        ...
      </project>
      

      If I have MRELEASE-583 applied, I go through the snapshot resolution dialog:

      There are still some remaining snapshot dependencies.: Do you want to resolve them now? (yes/no) no: : yes
      Dependency type to resolve,: specify the selection number ( 0:All 1:Project Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1: : 
      Resolve Project Dependency Snapshots.: 'org.dataconservancy:parent-pom' set to release? (yes/no) yes: : yes
      What is the release version? 1.0.0: : 1.0.0-test
      

      The resulting release pom doesn't use 1.0.0-test as the parent version. It uses 1.0.0:

      <project>
        <groupId>org.dataconservancy</groupId>
        <artifactId>project-pom</artifactId>
        <version>1.0.0-test</version>
      
        <parent>
          <groupId>org.dataconservancy</groupId>
          <artifactId>parent-pom</artifactId>
          <version>1.0.0</version>
        </parent>
      
        ...
      </project>
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: