Maven 2.x Release Plugin

Value of ${project.version} is captured before version resolution

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0-beta-6
  • Fix Version/s: None
  • Component/s: scm
  • Labels:
    None
  • Environment:
    OS X 10.4.9, Java 5, Maven 2.0.6
  • Number of attachments :
    0

Description

Our organization uses tags in which are the product version and only the product version:
/tags
/2.0.1
/2.0.2
....
/2.1.12

The default value of <tag> is "${project.artifactId}-${project.version}" as specified in MRELEASE-53.

However, when I specify the value of <tag> as follows:
<tag>${project.version}</tag> -or- <tag>${version}</tag>

release:prepare resolves this to "artifact-x.y.z-SNAPSHOT".

In other words, when a <tag> is specified, it is taken before the release process finalizes the release number.

While I can specify the release on the command line, I need to be able to batch mode this process.

<tag>${project.version}</tag> should resolve to: "2.0.2" (or x.y.z).

Activity

Hide
Luc Willems added a comment -

same problem here.

useing <tag>${version}</tag> resolves into "snapshot" versions in the final TAG name.

maybe we should change tag info "prefix-tag" and append runtime version during release proces.

Show
Luc Willems added a comment - same problem here. useing <tag>${version}</tag> resolves into "snapshot" versions in the final TAG name. maybe we should change tag info "prefix-tag" and append runtime version during release proces.
Hide
Dmitry Katsubo added a comment -

Currently I see only one workaround for the issue:

1. Specify project.rel.org.codehaus.mojo and/or project.dev.org.codehaus.mojo from the commend line (see here http://maven.apache.org/plugins/maven-release-plugin/examples/non-interactive-release.html for more details):

-Dproject.rel.org.codehaus.mojo:jaxws-maven-plugin=1.12.1 -Dproject.dev.org.codehaus.mojo:jaxws-maven-plugin=1.13-SNAPSHOT

2. Refer then this information from pom.xml:

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>https://myserver.com/svn/public/tags/java/jaxws-maven-plugin/</tagBase>
<tag>${project.rel.org.codehaus.mojo:jaxws-maven-plugin}</tag>
</configuration>
</plugin>
</plugins>
</build>

Show
Dmitry Katsubo added a comment - Currently I see only one workaround for the issue: 1. Specify project.rel.org.codehaus.mojo and/or project.dev.org.codehaus.mojo from the commend line (see here http://maven.apache.org/plugins/maven-release-plugin/examples/non-interactive-release.html for more details): -Dproject.rel.org.codehaus.mojo:jaxws-maven-plugin=1.12.1 -Dproject.dev.org.codehaus.mojo:jaxws-maven-plugin=1.13-SNAPSHOT 2. Refer then this information from pom.xml: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <configuration> <tagBase>https://myserver.com/svn/public/tags/java/jaxws-maven-plugin/</tagBase> <tag>${project.rel.org.codehaus.mojo:jaxws-maven-plugin}</tag> </configuration> </plugin> </plugins> </build>
Hide
Dmitry Katsubo added a comment -

Can anybody confirm that the problem can be workarounded, if one uses <tagNameFormat>@{project.version}</tagNameFormat> in pom.xml (as stated in Overriding the default tag name format)?

Show
Dmitry Katsubo added a comment - Can anybody confirm that the problem can be workarounded, if one uses <tagNameFormat>@{project.version}</tagNameFormat> in pom.xml (as stated in Overriding the default tag name format)?

People

Vote (3)
Watch (1)

Dates

  • Created:
    Updated: