Mvn release: crash from git branch: should pom.xml have the same version on master?

We have several projects that are very similar. I am trying to make mvn release from git branch. (Verifying the branch and then releasing mvn). In some projects, this works fine, on other mvn releases: preparation works fine, but when I do mvn release: it fails.

The error occurs when he tries to execute "cd ... target / checkout & git pull ...", I get the following:

[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 execute the commands manually, I get a problem with git merging with pom.xml. I assume it fails when pom.xml have different versions on master and branch. That is, if the version on branch 1.4 is 1.4.2-SNAPSHOT, and the version on the trunk is 1.5.0-SNAPSHOT, it fails.

In my opinion, this should not be the requirement that the pomps are the same: I am not doing mvn: release from master, but from the git branch. It's not so weird, is it? Does anyone know about this?

+6
source share
1 answer

Just in case someone sees this, it looks like this is a problem with the latest 2.2.2 release plugin. 2.2 seems to work fine for me from a branch with different versions of pom. (will be updated when I learn more)

+3
source

Source: https://habr.com/ru/post/899280/


All Articles