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

mar*_*ars 4 java spring-mvc maven

在构建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] ->
Run Code Online (Sandbox Code Playgroud)

Spa*_*wer 5

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

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