Big Milestone for Groovy and Grails in NetBeans IDE
By Geertjan-Oracle on Nov 22, 2007
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.