Is the maven release: the branch should update the scm url of the branch?

I have this in my pom:



When I run:

mvn release:branch -DbranchName=myBranch


Here's a branch successfully created:


But when I look in the pom.xml of this branch, the "scm" part remains the same as trunk



Doc says :

  • Convert SCM information to POM to include final tag assignment

Shouldn't the plugin replace "/ trunk" with "/ branches / myBranch"? Or do we have to do it manually?


source to share

2 answers

I replaced






And the transformation is happening now.



The plugin replaces "trunk" with "branch / myBranch", but does not switch your working copy. In the newly created branch, looking at the remote pom.xml, the scm information should have changed for that branch. maven: release fails if it cannot commit changes.

[maven-release-plugin] prepare for next development iteration
[maven-release-plugin]  copy for branch a-project-1.0
[maven-release-plugin] prepare branch a-project-1.0


Is your svn log similar to this revision, did you create a branch?

In this example, r1641 has changed the scm pom information from "trunk" to "branch / a-project-1.0".
r1642 copied the trunk to the branch, creating it.
r1643 changed the pom scm information again from "branch / a-project-1.0" to "trunk" so that you stay in the trunk in your working copy.

When I used maven release and it failed, it always showed an error on the command line and left temporary files on my working copy that need to be removed or cleaned up with mvn -batch-mode release: clean .

Try changing scm.url to " " instead of "(I don't think that maven might change your current url setting)
Then go again: mvn --batch-mode -DbranchName = "A_TEST" -Darguments = "- DskipTests = true"
and check for console errors, svn log in svn projects root folder, and check your local working copy changes. If everything should be ok but it is not, check the maven runtime version. I have problems with maven: release and maven 3.0.5 when releasing tags. I only use maven 3.1+ to automate forking / release.



All Articles