views:

291

answers:

1

I would like to setup my maven release to run in batch mode, but I'm not a fan of the default scm tag ${artifactId}-${releaseVersion}. Instead, I'd like to simply tag it with ${releaseVersion}; however, I'm unclear if such a property exists (ie. without the -SNAPSHOT suffix).

I'd like the configuration to resemble the code below. Is such a default tagging possible with the maven-release-plugin?

 <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.0</version>
        <configuration>
          <tag>${releaseVersion}</tag>
        </configuration>
      </plugin>
A: 

try this:

<configuration>
     <tag>${project.version}</tag>
</configuration>
Stefan De Boey
When I run this, at least with a mvn release:prepare -DdryRun=true, I get the scm tag 0.2-SNAPSHOT(ie. with -SNAPSHOT). I'm looking for an easy way to get the version number without SNAPSHOT.
strange, isn't the release supposed to be a normal version and not a napshot --> Change the version in the POMs from x-SNAPSHOT to a new version
Stefan De Boey
Change the version in the POMs from x-SNAPSHOT to a new version --> taken from the documentation
Stefan De Boey
When running the release:prepare in batch mode the maven-release-plugin manages updating all the pom files (ie. 0.2-SNAPSHOT becomes 0.2). So I can't change the pom files. I'm just trying to find out if there is a property I can use to determine the target release version; the maven-release-plugin documentation suggest one exists I'm just hopeful.
sorry, i don't mean you should change the pom. 'Change the version in the POMs from x-SNAPSHOT to a new version '. you shouldn't do this yourselves, the release plug-in does this for you. and indeed, my proposed solution doesn't work.
Stefan De Boey
there doesn't seem to be a way to do this. there's no property you could use for this. also, see the second answer in this question: http://stackoverflow.com/questions/782301/maven-release-via-hudson
Stefan De Boey
:( - See related JIRA issue - http://jira.codehaus.org/browse/MRELEASE-259 andhttp://jira.codehaus.org/browse/MRELEASE-159