Cannot get the branch information from the scm repository
Asked Answered
T

2

7

I am getting following error in building the maven project. Any idea in solving this?

 [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] ->
Tibbs answered 23/2, 2016 at 8:16 Comment(3)
It seems that git.exe is searched in a wrong path. Is git installed and available in the PATH ?Crudden
it is installed, I'm not sure whether it is available in path or not. How do i check this ?Tibbs
Just open a DOS shell (cmd.exe), and type "git", you will see .Crudden
A
7

I solved the same issue by updating my git version. But downgrading the version of the maven plugin to 1.13 will also solve this issue.

  • buildnumber-maven-plugin v1.4 works with git v2.9.2 but not with v1.9.*
  • buildnumber-maven-plugin v1.3 works with git v1.9.*
Amabelle answered 18/7, 2016 at 14:54 Comment(0)
B
0

I was getting this exception on my windows IDE because git was not configured in PATH variable. After adding git bin in PATH variable and restart the IDE it got fixed.

Bilocular answered 6/10, 2023 at 6:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.