Suppose I noted the release version of our project under $SVNROOT/project/tags/1.0. Suppose now that I need to create a branch from this tag, mark it as SNAPSHOTand update the configuration scm.
I tried with the goal release:preparein this way:
$ svn co $SVNROOT/project/tags/1.0 project-1.0
$ cd project-1.0
$ mvn release:branch -DbranchName=project-1.0.X -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false
But this fails, with an error message warning me that I do not have the right to pass to the path $SVNROOT/project/tags/1.0 project-1.0(which is absolutely true --- we do not allow commits to tags).
What am I doing wrong here, and why did Maven try to commit something to the tag?
Update
Just to clarify: I run this from the directory in which I checked the tag. The exact error I get is the following:
[INFO] Executing: /bin/sh -c cd xxx && svn
[INFO] Working directory: xxx
org.apache.maven.shared.release.scm.ReleaseScmCommandException: Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
you do not have the rights to access this file: xxx/tags/xxx.
at org.apache.maven.shared.release.phase.ScmCommitPhase.checkin(ScmCommitPhase.java:133)
at org.apache.maven.shared.release.phase.ScmCommitPhase.execute(ScmCommitPhase.java:109)
at org.apache.maven.shared.release.DefaultReleaseManager.branch(DefaultReleaseManager.java:379)
at org.apache.maven.shared.release.DefaultReleaseManager.branch(DefaultReleaseManager.java:350)
at org.apache.maven.plugins.release.BranchReleaseMojo.execute(BranchReleaseMojo.java:133)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO]
[ERROR] BUILD FAILURE
[INFO]
[INFO] Unable to commit files
Provider message:
The svn command failed.
Command output:
svn: Commit failed (details follow):
svn: 'pre-commit' hook failed with error output:
you do not have the rights to access this file: xxx/tags/xxx.