【问题标题】:Cannot get the branch information from the scm repository无法从 scm 仓库获取分支信息
【发布时间】:2016-06-04 23:24:13
【问题描述】:

我在构建 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.exe 搜索路径错误。 git 是否已安装并在 PATH 中可用?
  • 它已安装,我不确定它是否在路径中可用。我如何检查这个?
  • 只要打开一个DOS shell(cmd.exe),输入“git”,你就会看到。

标签: java maven spring-mvc


【解决方案1】:

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

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

【讨论】:

  • 谢谢,你造了我的作品:)
猜你喜欢
  • 2010-12-09
  • 1970-01-01
  • 2013-05-25
  • 1970-01-01
  • 2017-06-18
  • 1970-01-01
  • 2019-10-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多