简体   繁体   中英

Maven Release prepare fails with Git submodules

We have a multi-module Maven project, where the modules are also Git submodules.

When I perform mvn release:prepare on the parent project, I get this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project big-project-parent: Unable to commit files
[ERROR] Provider message:
[ERROR] The git-add command failed.
[ERROR] Command output:
[ERROR] fatal: Pathspec 'basic-utils\pom.xml' is in submodule 'basic-utils'

Check first, as mentioned here , is the commitByProject can help (maven release 2.0+)

mvn release:prepare -DcommitByProject=true

MRELEASE-726 states that Git support has been improved with 2.5.x., so make sure to use a recent maven release plugin, 3.0+.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM