maven 无法从SCM存储库获取分支信息

t1qtbnec  于 12个月前  发布在  Maven
关注(0)|答案(2)|浏览(155)

我在构建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] ->
a1o7rhls

a1o7rhls1#

我通过更新我的git版本解决了同样的问题。但是将maven插件的版本降级到1.13也可以解决这个问题。

  • buildnumber-maven-plugin v1.4适用于git v2.9.2,但**不适用于v1.9。*
  • buildnumber-maven-plugin v1.3与git v1.9兼容。*
xdnvmnnf

xdnvmnnf2#

我在我的windows IDE上得到这个异常,因为git没有在PATH变量中配置。在PATH变量中添加git bin并重新启动IDE后,它得到了修复。

相关问题