我们有一个多模块的Maven项目,其中的模块也是Git子模块。
当我在父项目上执行mvn release:prepare时,我得到这个错误:
[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'发布于 2020-06-21 17:13:58
作为mentioned here,首先检查commitByProject是否可以提供帮助(maven release 2.0+)
mvn release:prepare -DcommitByProject=trueMRELEASE-726声明Git支持已经在2.5.x版本中得到了改进,因此请确保使用最新的maven发布插件3.0+。
https://stackoverflow.com/questions/62446508
复制相似问题