Git error

Am getting following error:

| Loading Grails 2.2.3
| Error There was an error loading the BuildConfig: Cannot run program "git": error=2, No such file or directory (Use --stacktrace to see the full trace)

I already tested git from settings to make sure full path is defined as well tested it using test button. I'm using IntelliJ12 on Mac 10.8.4

Any help will be highly appreciated.

-Deep

0
Avatar
Permanently deleted user

Try to add --stacktrace to Grails Run Configuration to see full stack trace.

0
Avatar
Permanently deleted user

This is what I'm getting with stacktrace:

| Loading Grails 2.2.3
| Error There was an error loading the BuildConfig: Cannot run program "git": error=2, No such file or directory (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.io.IOException: Cannot run program "git": error=2, No such file or directory
 at BuildConfig.run(BuildConfig.groovy:9)
 at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1050)
 at grails.util.BuildSettings$loadConfig.callCurrent(Unknown Source)
 at grails.util.BuildSettings.loadConfig(BuildSettings.groovy:1028)
 at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.io.IOException: error=2, No such file or directory
 ... 5 more
| Error There was an error loading the BuildConfig: Cannot run program "git": error=2, No such file or directory

Process finished with exit code 1

0
Avatar
Permanently deleted user

So the problem is in BuildConfig.groovy:9. What is the code in BuildConfig.groovy line 9?

0
Avatar
Permanently deleted user

grails.project.war.file = "target/${appName}-${appVersion}-${Environment.current.name}-${"git rev-parse --short HEAD".execute().text.replace('\n', '')}.war"


If I provide full git path then it is works but I've already given path in perference -> version control -> git
0
Avatar
Permanently deleted user

Try to run "grails war" in command line. Does it work correct?

0
Avatar
Permanently deleted user

Yes, command line is working fine.

0

请先登录再写评论。