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

Can't generate release-pom.xml when custom finalName contains ${project.version}

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.2
    • 2.4
    • None
    • None

    Description

      Setup your project with a <project><build><finalName> element setup like:

      <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>

      Setup ${project.version} to a SNAPSHOT like:

      <version>0.0.1-SNAPSHOT</version>

      The key thing here is the use of ${project.version} in the <finalName> and ew start with a SNAPSHOT version trying to perform a release.

      Now we run: mvn release:prepare-with-pom

      It will bail out with error now and a message ... "Cannot reliably adjust the finalName of project:" and I believe this is due to the -SNAPSHOT being visible and the code that throw the exception is looking at the original, unedited version of the pom.xml.

      I think after editing the pom.xml the in-memory model should be refreshed and all ${variable} be re-interpreted.

      Attachments

        Activity

          People

            rfscholte Robert Scholte
            dlmiles Darryl L. Miles
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: