How do you do multiple (active) branch development with svn and mvn?
With svn, branches have to be used if you need to do any serious development. So, if you have two branches of active development (e.g. my-prototype and trunk) then how do you development with mvn and its local repositories?
I have resorted to using alias mvn='mvn -Dmaven.repo.local=~/.m2/repository/$branch, so that I can create separate universes while doing separate builds. I don't see a way around it because for SNAPSHOT components, it is very likely that with single local repository, you'll end up overwriting the SNAPSHOT components (or even versioned ones) and thus messing up the two builds.
This means however that the things that don't change (e.g. apache-commons, and other gazillion dependencies) have to be copied in all local repositories!
Does anyone know any work-around?


I just had to do this very same thing. I had some weirdness creep in with the plugins maven was trying to download, though. Not sure what that was all about.
Posted by Justin Lee on April 05, 2009 at 07:18 AM PDT #
Yes, there is.
You should use mvn-release-plugin to branch and there by creating your own versions of artifacts. e.g., we use it to do promotions in GFv3.
Posted by Sahoo on April 28, 2009 at 10:45 AM PDT #