Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn release:perform fails from a git branch: does the pom.xml need to have same version on master?

we have several projects that are very similar. I'm trying to do a mvn release from a git branch. (Checking out the branch, then doing mvn release). On some of the projects this works fine, on others mvn release:prepare works just fine but when I do mvn release:perform it fails.

The failure comes when it tries to do the "cd ...target/checkout && git pull...", I get this:

[ERROR] The git-pull command failed.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Unable to checkout from SCM
Provider message:
The git-pull command failed.
Command output:

If I do the commands manually I get a git merge issue with the pom.xml. My guess is that it fails when the pom.xml have different versions on master and branch. I.e. if the version on the 1.4 branch is 1.4.2-SNAPSHOT and the version on trunk is 1.5.0-SNAPSHOT it fails.

In my mind it shouldn't be a requirement that the poms are identical: I'm not doing the mvn:release from master but from a git branch. That's not so horribly strange, is it? Does anybody know about this?

like image 931
PapaFreud Avatar asked Oct 14 '11 08:10

PapaFreud


1 Answers

Just in case someone sees this, it seems like this is a problem with latest release plugin 2.2.2. 2.2 seems to work fine for me for building from a branch with different pom versions. (will update when i find out more)

like image 140
adrian Avatar answered Nov 15 '22 06:11

adrian