Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-150

Can't add prefix to tags without affecting version

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Duplicate
    • Affects Version/s: 2.0-beta-4
    • Fix Version/s: None
    • Component/s: perform
    • Labels:
      None
    • Number of attachments :
      1

      Description

      I added the following to my POM

      <plugin>
      <artifactId>maven-release-plugin</artifactId>
      <configuration>
      <tag>XXX-$

      {artifactId}-${version}</tag>
      </configuration>
      </plugin>

      However the tag comes out incorrectly.

      [INFO] Full run would be tagging C:\PerforceViews\... with label: 'XXX-myproject-0.5.4-SNAPSHOT

      What is the default? <tag>${artifactId}

      -$

      {version}

      </tag>
      Note: this seems to be missing from the plugin documentation, it only mentions releaseLabel, which defaults to tag.

        Issue Links

          Activity

          Hide
          Mike Perham added a comment -

          I suspect the variables are getting resolved during the POM snapshot -> release transform so that the <tag> value is then hardcoded to that value, no longer using variables.

          Show
          Mike Perham added a comment - I suspect the variables are getting resolved during the POM snapshot -> release transform so that the <tag> value is then hardcoded to that value, no longer using variables.
          Hide
          Yuri Schimke added a comment -

          Just realised, the default is obviously null, so that it prompts you to enter the label.

          So its actually set at a point that understands the various versions. Can this be addressed by adding extra variables that can be referenced i.e.

          • version.previous
          • version.release
          • version.next
          Show
          Yuri Schimke added a comment - Just realised, the default is obviously null, so that it prompts you to enter the label. So its actually set at a point that understands the various versions. Can this be addressed by adding extra variables that can be referenced i.e. version.previous version.release version.next
          Hide
          Roberto Lo Giacco added a comment -

          It would be very nice to allow for something like

          <tag>XXXXX-$

          {project.relase.version}

          </tag>

          Any hint how it can be performed?

          Show
          Roberto Lo Giacco added a comment - It would be very nice to allow for something like <tag>XXXXX-$ {project.relase.version} </tag> Any hint how it can be performed?
          Hide
          Sergio Fernandes added a comment -

          I have the same problem: I need to add a suffix to make the release tag match our naming pattern.

          Adding these variables seems to be very easy and valuable.

          Show
          Sergio Fernandes added a comment - I have the same problem: I need to add a suffix to make the release tag match our naming pattern. Adding these variables seems to be very easy and valuable.
          Hide
          Jeff Skjonsby added a comment -

          Here's a patch with unit tests that adds simple substitution for [groupId], [artifactId], and [version] in the release label.

          Show
          Jeff Skjonsby added a comment - Here's a patch with unit tests that adds simple substitution for [groupId] , [artifactId] , and [version] in the release label.
          Hide
          hanasaki added a comment -

          Could this be made more generic allowing for SVN and GIT versions as well?
          ex: blahblah-v1.2.0-r756.jar

          Show
          hanasaki added a comment - Could this be made more generic allowing for SVN and GIT versions as well? ex: blahblah-v1.2.0-r756.jar
          Hide
          Stephen Connolly added a comment -

          Closing as duplicate of MRELEASE-159

          Show
          Stephen Connolly added a comment - Closing as duplicate of MRELEASE-159

            People

            • Assignee:
              Unassigned
              Reporter:
              Yuri Schimke
            • Votes:
              18 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: