我在构建 Maven 项目时遇到以下错误。有解决这个问题的想法吗?
[ERROR] Failed to execute goal org.codehaus.mojo:buildnumber-maven-plugin:1.4:create (default) on project pwc-em: Cannot get the branch information from the scm repository :
[ERROR] Exception while executing SCM command. Error while executing command. Error while executing process. Cannot run program "git" (in directory "C:\Users\vmasama\Documents\workspace-sts-3.7.2.RELEASE\pwc-em"): CreateProcess error=2, The system cannot find the file specified
[ERROR] ->
最佳答案
我通过更新我的 git 版本解决了同样的问题。但是将maven插件的版本降到1.13也可以解决这个问题。
- buildnumber-maven-plugin v1.4 适用于 git v2.9.2 但不适用于 v1.9.*
- buildnumber-maven-plugin v1.3 适用于 git v1.9.*
关于java - 无法从 scm 存储库获取分支信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35572205/