views:

266

answers:

1

Hi,

I have a maven multi module project. If I need to branch, I use the maven-versions plugin to go through my project and update the parent version number rather easily. Is there a similar plugin to update my scm location in all of my poms?

+4  A: 

Why don't you use the Maven Release Plugin and its release:branch mojo for that? From the Create a branch page:

Creating a branch executes the following steps:

  • Check that there are no uncommitted changes in the sources
  • Change the version in the poms if you want to change it in the branch (you will be prompted for the versions to use)
  • Transform the SCM information in the POM to include the final destination of the tag
  • Commit the modified POMs
  • Tag the code in the SCM as a new branch with a version name (this will be prompted for)
  • Bump the version in the POMs if you want to change it to a new value y-SNAPSHOT (these values will also be prompted for)
  • Commit the modified POMs
Pascal Thivent