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

时间:2016-02-23 08:16:25

标签: java maven spring-mvc

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

1 个答案:

答案 0 :(得分:4)

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

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