如何在NetBeans中使用Groovy 2.0 [英] How to use Groovy 2.0 in netbeans

查看:219
本文介绍了如何在NetBeans中使用Groovy 2.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用groovy 2.0 in Netbeans 7.1.2,因为我想使用静态类型检查.

I want to use groovy 2.0 in Netbeans 7.1.2 because I want to use the static type checking.

默认情况下,Netbeans使用库Groovy 1.6.4-groovy-all.jar

By default that Netbeans uses the library Groovy 1.6.4 - groovy-all.jar

如何使Netbeans使用Groovy 2.0.

How do I get Netbeans to use Groovy 2.0.

我试图删除groovy 1.6.4- groovy-all.jar库并添加groovy2.0-groovy-all.jar.

I tried to just delete the groovy 1.6.4- groovy-all.jar library and add the groovy2.0-groovy-all.jar.

我试图去tools -> libraries -> groovy 1.6.4并用groovy 2.0 jar替换罐子.

I tried to go to tools -> libraries -> groovy 1.6.4 and replace the jar with the groovy 2.0 jar there.

两者都导致相同的错误:

Both result in the same error:

The includeAntRuntime=false option is not compatible with fork=false
/root/NetBeansProjects/myProject/nbproject/build-impl.xml:606: The following error occurred while executing this line:
/root/NetBeansProjects/myProject/nbproject/groovy-build.xml:23: Compilation Failed

推荐答案

NetBeans 7.2于今天发布,这将内部Groovy支持提升到v1.8.6

NetBeans 7.2 came out today, and that ups internal Groovy support to v1.8.6

我不认为您可以将Groovy 2.0放到NetBeans中并期望它支持它(已经发生了很多变化)

I don't think you can just drop Groovy 2.0 into NetBeans and expect it to support it (so much has changed)

但是,这并不会阻止您使用自己的Ant/Gradle(正在进行中 Gradle插件)构建脚本,并使用它来管理您的依赖项.但是NetBeans对类型检查一无所知,因此您可能不得不忽略一些它说是错误的内容(但不是)

However, this doesn't stop you using your own Ant/Gradle (there's a work in progress Gradle plugin here) build script and using this to manage your dependencies. But NetBeans won't know anything about the type checking, so you will probably have to ignore some stuff that it says is an error (but which isn't)

这篇关于如何在NetBeans中使用Groovy 2.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆