netbeans 11 是否支持 grails? [英] does netbeans 11 support grails?

查看:25
本文介绍了netbeans 11 是否支持 grails?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Netbeans 8 曾经很好地支持 grails 3,但不幸的是不适用于多模块项目.我尝试了 intellij Ultimate,但它的 grails 支持同样糟糕.

我刚刚下载了 netbeans 11 的 bin 发行版,并在隐私设置中启用"了它(不幸的是,他们没有 mac dmg 或 pkg 安装程序),但它似乎没有任何 grails 支持(没有可用的插件)

我刚刚尝试导入我的 grails 3.3.8 项目,但它只是说已损坏".甚至不会给我看源代码.

有人运气好吗?

解决方案

首先,请注意 Grails 3.x 不适用于 JDK 11,因此如果您的 NetBeans 11.0 安装使用的是 JDK 11,请将默认平台更改为 JDK 8反而.您可以通过对 etc/netbeans.conf 进行适当的编辑来完成此操作.就我而言,在 Windows 10 机器上,更改如下所示:

<块引用>

netbeans_jdkhome="C:Javajdk1.8.0_201"

(当然,您仍然可以将 JDK 11 作为额外的 Java 平台.)

接下来,正如对 OP 的评论所指出的,您需要安装 Groovy 插件才能在 NetBeans 11 中使用 Grails.您将看到 1.36.1 版Groovy 插件可从工具 > 插件 > 已安装激活:

不幸的是,在点击激活后,插件不允许从工具>选项>杂项>Groovy选项卡配置Grails,因为Grails Home 字段缺失:

对此的修复是卸载(不仅仅是停用)与 NetBeans 11 捆绑在一起的 Groovy 和 Gradle 插件,并恢复到 NetBeans 8.2 提供的插件.这记录在

Netbeans 8 used to support grails 3 well, but unfortunately did not work with multi-module projects. I tried intellij ultimate, but its grails support is just as poor.

I just downloaded the bin distribution of netbeans 11, and "enabled" it in privacy settings (They dont have a mac dmg or pkg installer unfortunately), but it doesnt seem to have any grails support whatso ever (no plugins available)

I just tried importing my grails 3.3.8 project, and it just says "broken". Won't even show me the source code.

Anyone had any luck with it?

解决方案

First, note that Grails 3.x will not work with JDK 11, so if your NetBeans 11.0 installation is using JDK 11, change the default platform to JDK 8 instead. You can do this by a suitable edit to etc/netbeans.conf. In my case, on a Windows 10 machine the change looks like this:

netbeans_jdkhome="C:Javajdk1.8.0_201"

(Of course you can still have JDK 11 as an additional Java platform.)

Next, as a comment to the OP noted, you need to install the Groovy plugin to use Grails with NetBeans 11. You will see that version 1.36.1 of the Groovy plugin is available for activation from Tools > Plugins > Installed:

Unfortunately, after clicking Activate, the plugin does not allow configuration of Grails from the Tools > Options > Miscellaneous > Groovy tab, since the Grails Home field is missing:

The fix for that is to uninstall (not just deactivate) the Groovy and Gradle plugins that came bundled with NetBeans 11, and revert to the plugin that was provided with NetBeans 8.2. This is documented in Bug Report NETBEANS-1976

Although the new "Gradle" and "Groovy and Gradle" plugins automatically disable themselves, this isn't good enough to avoid various conflicts with the old "Gradle Support" plugin. I had to uninstall the new "Gradle" and "Groovy and Gradle" plugins in order to get everything working with the old plugin on Netbeans 11.

The steps to follow to install the older version of the Groovy plugin are the same as those with NetBeans 9.0, as described in this answer to "Groovy and Grail plugin is missing in Netbeans IDE 9".

After doing all that you should be able to use the Project Wizard (File > New Project... > Groovy) to create a Grails Application in NetBeans 11:

这篇关于netbeans 11 是否支持 grails?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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