When executing the mvn release:branch
command, I'd like to try and configure the -DbranchName
argument with a version parameter. But I haven't been able to find a way to successfully do this yet.
For example, if I have a project in trunk with version 1.0-SNAPSHOT, I want to create a branch using the --batch-mode
option and specify a -DbranchName
with the current project version (1.0-SNAPSHOT) as a parameter in the within the branchName.
I've tried doing mvn release:branch -DbranchName=VERSION-@{project.version}
, but it doesn't seem to work as I had hoped. Instead of creating a branch with the name VERSION-1.0, I get the following error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:branch (default-cli) on project project-a: Unable to branch SCM
[ERROR] Provider message:
[ERROR] The svn branch command failed.
[ERROR] Command output:
[ERROR] svn: E205000: Try 'svn help copy' for more information
[ERROR] svn: E205000: Syntax error parsing peg revision '{project.version}'
Is there a valid way to do this? Or is this not possible when doing a release:branch
with the maven release plugin?
Edit
Basically what I'm looking for is something similar to the tagNameFormat
property but for branches. When doing a release:perform
goal, I can have <tagNameFormat>VERSION-@{project.version}</tagNameFormat>
specified in the pom, and I don't need to include any tag name property when doing a release using --batch-mode
. Is there any similar property for formatting of branch names when doing a release:branch
?