执行脚本时出错Clean:org.codehaus.gant.GantBuilder(使用--stacktrace查看完整的跟踪)

时间:2012-05-09 17:09:36

标签: grails

Java版本1.6
Grails版本2.0.0

当我执行grails clean时,我得到了

Error executing script Clean: org.codehaus.gant.GantBuilder (Use --stacktrace to see the full trace)

C:\projects\botServices>grails --stacktrace clean
| Configuring classpath
| Error Error executing script Clean: org.codehaus.gant.GantBuilder (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NoClassDefFoundError: org.codehaus.gant.GantBuilder
        at org.codehaus.gant.GantBinding.class$(GantBinding.groovy)
        at org.codehaus.gant.GantBinding.$get$$class$org$codehaus$gant$GantBuilder(GantBinding.groovy)
        at org.codehaus.gant.GantBinding.<init>(GantBinding.groovy:41)
| Error Error executing script Clean: org.codehaus.gant.GantBuilder

我之前从未遇到过这个问题。奇怪。

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

我的Mac(Leopard)也有类似的问题。这是因为JAVA_HOME没有指向jdk 1.6 它可以通过几种方式解决

  1. 导出JAVA_HOME = / System / Library / Frameworks / JavaVM.framework / Versions / 1.6 / Home (仅适用于该特定会议)

  2. 如果每次都需要反映Java_Home,请更新〜/ .profile

  3. 希望有所帮助