Geertjan's Blog

Big Milestone for Groovy and Grails in NetBeans IDE

Geertjan Wielenga
Product Manager
The biggest development of Groovy and Grails in relation to NetBeans IDE happened yesterday: "Groovy and Grails support in NetBeans has been enabled on Development Update Center." I mean, the most concrete contribution of Groovy and Grails support and the clearest sign that NetBeans loves Groovy (and Grails). The work done by Martin Adamek and Matthias Schmidt is now, for the first time, available in the update center for NetBeans Development Builds (i.e., for post-6.0 builds, hence, not in RC 2). They will not be part of the standard NetBeans IDE 6.0 distribution, because of timing and planning and so on, but anyone with a development build (obtainable from netbeans.org download page) can go to the Plugin Manager and look for Groovy:

Partly, this is what I referred to a few days ago in this blog: "Interestingly, I've talked to lots of people internally in NetBeans and Sun recently about Groovy, even more so than before. Watch this space for some interesting announcements coming up in the next months (or maybe even sooner)."

After installation of the plugin, one has new project templates:

You need to register Groovy and Grails in the Options window, before you can use them. I don't like this. But I can see how it is preferable. It means a smaller NBM distribution and no need for licensing issues, because the user has to register Groovy and Grails themselves. That also allows the user to set a different Groovy or Grails version, if so desired. You could set Groovy 1.0 and then later upgrade to Groovy 1.1, without needing to wait for a related NBM to be distributed. Still, I'm lazy and I liked the approach that I took, where everything was handled internally.

After the above registration, you can generate Grails projects and deploy them. You can also run Groovy scripts:

And how does this relate to my plugin in the Plugin Portal? It doesn't really. It is based on much firmer footing than my plugin. It makes use of the General Scripting Framework, which Tor Norbye is spinning out of his JRuby support. (So, yes, this implies Groovy support in NetBeans IDE will be similar/same as what Tor has been doing for JRuby.) It makes use of the NetBeans Lexer API. It really is the right approach to take, while I took the simplified Schliemann approach. I did that because I wanted a quick result; I wanted to start working with Groovy immediately and Schliemann afforded that opportunity. I got "good enough" results, was able to run Groovy scripts (as well as Java/Groovy combinations, which the Martin/Matthias plugin doesn't yet support). Plus, part of the motivation for my plugin was to say to the Groovy/Grails community: "Hey guys, there are plenty of people in Sun who love your work and, look, one of them has even produced a NetBeans plugin." Both these use cases are now becoming obsolete, because the new plugin caters to both of them. So, sooner or later, I will remove the plugin from the Plugin Portal and point to a tutorial that describes how to use the official plugin in NetBeans. But, since the official plugin will only be official after 6.0, that could still take some time. You're welcome to try either plugin, though the future is clearly with the other one.

So, if interested in Groovy/Grails, download a development build, install the plugin, play around with it, and then file bugs and enhancements in the 'groovy' category in Issuezilla. Information and tasks for this plugin can be found here. The Groovy plugin is built three times a day as part of the development build and committers (you could be one of them, if you're interested) need to be careful because they could even break the build. That's how committed NetBeans is to Groovy and Grails and is a sign of how solid the plugin already is: we are even willing to have the NetBeans builds break for Groovy and Grails.

In other news. Have a look at Wouter van Reeven's article on Seam, Maven, NetBeans IDE, and GlassFish, here.

Join the discussion

Comments ( 16 )
  • Francois MAROT Friday, November 23, 2007

    good news, keep up the good work ! :)

  • Sakuraba Friday, November 23, 2007

    Best news I could ever hear from the Netbeans guys.

    Thank you for your plugin-development regardless of an official plugin in the future.

  • David Friday, November 23, 2007

    It's great, thanks for this article.

    Now it is simple to develop with groovy

  • Stefan Friday, November 23, 2007

    Great news. Although you have allready provided a very nice plugin this will hopefully be the base for the full-featured Groovy support in NetBeans.

  • Rafael Friday, November 23, 2007

    "It makes use of the NetBeans Lexer API. It really is the right approach to take, while I took the simplified Schliemann approach. I did that because I wanted a quick result; I wanted to start working with Groovy immediately and Schliemann afforded that opportunity. I got "good enough" results"

    Does that mean that there is no upgrade path from Schliemann to the more advaced APIs? It's a shame, I thought Schlieamann was quite an elegant approach to adding language support to an IDE. OTOH, I've yet to take a look at the lexer API, so I can't tell how arduous it would be.

  • Pan Feng Saturday, November 24, 2007

    Good news for all Groovy & Grails fans!

    I hope that the official plugin will coming soon.

  • Tom Saturday, November 24, 2007

    Hi Can you tell us how to "register Groovy and Grails in the Options window" as this is not immediately obvious to me.

  • Geertjan Saturday, November 24, 2007

    Tom, download Groovy from the Groovy site. Download Grails from the Grails site. Register the top level directories in the Options window.

  • Guillaume Laforge Sunday, November 25, 2007

    Congratulations to Geertjan, Martin, Matthias and all others. That's super cool!

  • ddevore Thursday, January 17, 2008

    I have problems that I don't know how to fix. I have NetBeans 6.0 and wanted to start working with Grails.


    I know this topic is a couple of months old now but I would really need some help with the Grails plugin.


    1. The Grails plugin cannot be found in the update centers included in the 6.0 install and I cannot find any other update center. I downloaded and installed it from the NetBeans site <a href="http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=4251">here</a>.


    2. I installed and registered Grails and Groovy, tried with only registering Grails first.


    3. I tried to create a Grails project in NB and the wizard simply goes away without creating anything, not even the project directory.


    4. I then tried to register Groovy, though the plugin was not showing an error without it being registered, and had the same results.



  • Odszkodowania Wednesday, January 30, 2008
  • Thai Boxing Friday, April 25, 2008

    good news, keep up the good work !

  • odszkodowanie Thursday, November 13, 2008

    good job

  • odszkodowania powypadkowe Thursday, November 13, 2008

    Good blog

  • zado&#347;&#263;uczynienie za &#347;mier&#263; Thursday, November 13, 2008


  • compensation forum Sunday, January 18, 2009

    good post

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.