0

我正在尝试从命令行在 Windows 7 (x64) 上运行 grails 应用程序和插件。我可以在没有插件的情况下运行应用程序,但是当我将插件添加到项目中时,我会收到带有消息的 java.io.IOException Cannot run program "grails" (in directory "[plugin directory]"): CreateProcess error=2, The system cannot find the file specified。grails/bin 文件夹位于我的系统环境路径变量中,并且可以在插件目录的命令行中运行。就好像 java 环境有自己的不包括 grails 的路径变量。有什么想法吗?

我在下面包含了应用程序的完整输出,并编辑了插件项目的路径。我希望今天下午向客户演示这个项目,非常感谢快速帮助。

| Loading Grails 2.2.1
| Compiling 3 source files.....
| Compiling 3 source files.....
| Error Error executing script RunApp: : Execute failed: java.io.IOException: Cannot run program "grails" (in directory "[plugin directory]"): CreateProcess error=2, The system cannot find the file specified (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
: Execute failed: java.io.IOException: Cannot run program "grails" (in directory "[plugin directory]"): CreateProcess error=2, The syst
em cannot find the file specified
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:675)
        at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.codehaus.gant.GantBuilder.invokeMethod(GantBuilder.java:99)
        at _Events$_run_closure2.doCall(_Events.groovy:35)
        at _Events$_run_closure2.doCall(_Events.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at _Events$_run_closure3.doCall(_Events.groovy:54)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.apache.tools.ant.BuildListener$targetStarted.call(Unknown Source)
        at org.codehaus.gant.GantBinding$_withTargetEvent_closure1.doCall(GantBinding.groovy:89)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:89)
        at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at RunApp$_run_closure1.doCall(RunApp.groovy:35)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
        at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at gant.Gant.withBuildListeners(Gant.groovy:427)
        at gant.Gant.this$2$withBuildListeners(Gant.groovy)
        at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
        at gant.Gant.dispatch(Gant.groovy:415)
        at gant.Gant.this$2$dispatch(Gant.groovy)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at gant.Gant.invokeMethod(Gant.groovy)
        at gant.Gant.executeTargets(Gant.groovy:591)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at gant.Gant.executeTargets(Gant.groovy:590)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1243)
Caused by: java.io.IOException: Cannot run program "grails" (in directory "[plugin directory]"): CreateProcess error=2, The system cann
ot find the file specified
        at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
        at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
        at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
        at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
        at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
        ... 53 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
        ... 58 more
| Error Error executing script RunApp: : Execute failed: java.io.IOException: Cannot run program "grails" (in directory "[plugin directory]"): CreateProcess error=2, The system cannot find the file specified
4

0 回答 0