grails clean, grails compile 및 grails run-app를 실행하기위한 그루비 스크립트를 만들고 싶었습니다. 그러나 grails 명령을 실행할 수없는 것으로 나타났습니다.grails 명령을 실행하는 Groovy 스크립트
def envs = System.getenv().collect{"$it.key=$it.value"}
//println envs
println "java -version".execute(envs, new File("c:\\")).err.text
println "grails -version".execute(envs, new File("c:\\")).text
이 자체가 나에게 다음과 같은 출력을 제공합니다 :
groovy> def envs = System.getenv().collect{"$it.key=$it.value"}
groovy> //println envs
groovy> println "java -version".execute(envs, new File("c:\\")).err.text
groovy> println "grails -version".execute(envs, new File("c:\\")).text
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)
Exception thrown
java.io.IOException: Cannot run program "grails" (in directory "c:\"): CreateProcess error=2, The system cannot find the file specified
at ConsoleScript26.run(ConsoleScript26:4)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
... 1 more
사람이 전에이 문제에 직면했습니다 사실 그때는 그루비 콘솔에서 다음 스크립트를 실행하려고?