我在构建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] ->
2条答案
按热度按时间a1o7rhls1#
我通过更新我的git版本解决了同样的问题。但是将maven插件的版本降级到1.13也可以解决这个问题。
xdnvmnnf2#
我在我的windows IDE上得到这个异常,因为git没有在PATH变量中配置。在PATH变量中添加git bin并重新启动IDE后,它得到了修复。