mvn release:prepare not committing changes to pom.xml

前端 未结 9 629
攒了一身酷
攒了一身酷 2020-11-28 05:11

I\'m trying to release a Jenkins plugin (stashNotifier) with Maven and face a problem with the release plugin.

mvn clean release:prepare

r

相关标签:
9条回答
  • 2020-11-28 05:35

    Similar issue, but I had this problem, using Jenkins Release Plugin and Gitlab:

    • First time it worked.
    • Second time it wouldn't commit.

    Turns out we had a typo in SCM config in our pom.xml, so the Project with typo got created on the first time. At the second time, Maven was accessing the outdated project and complained, not committing the changes.

    0 讨论(0)
  • 2020-11-28 05:37

    I ran into the same problem, solution by #richnou works for me (upgrading SCM dependency). There is the issue created on this problem, see link below. The problem relates with new version of Git where "git status" returns localized messages which plugin cannot parse. It is the root cause. The issue was fixed in git scm (1.8.1 version) by using --porcelain option of git (which should return easily parsable output), but after this fix, another problem has raised - if repository root (scm tag) is not the working directory, release:prepare still fails. This issue seems to be fixed in snapshot version of Git SCM (not released yet). This can be workarounded by copiing scm tag into child pom.

    MRELEASE-812

    SCM-709

    maven-release-plugin-and-git-fix

    0 讨论(0)
  • 2020-11-28 05:37

    I'm using Git 1.8.x locally and ran into similar problem:

    maven-scm-plugin does

    $ git add
    $ git status
    

    but no

    $ git commit
    

    Use another machine with Git 1.7.x helped me to work around this issue.

    Note: I tried using maven-scm-plugin 1.8.1 or 1.9, maven-release-plugin 2.4.1 or 2.4.2.

    0 讨论(0)
提交回复
热议问题