Groovy and Grails in NetBeans 6.7 M2

Today NetBeans 6.7 M2 was released (yes 7.0 is now 6.7). What are the new features you can use in Groovy and Grails development? Let's have a look.

First of all there is a couple of enhancements in properties of the Grails project. Now you can disable the browser opening on project run (general category of project properties).

Another improvement in project settings allows ou to configure the JDK. You can easily configure the required JDK in libraries category.

One big improvement for Grails development is code completion for dynamic methods of domain class especially dynamic finders.

Code completion was also enhanced to work with method reference operator and safe navigation operator as you can see on the following pictures. This is usable in both Groovy and Grails of course. The next screenshot shows method dereference operator completion.

And another picture for safe navigation operator.

One feature which was missing in previous releses was the ability to run any Grails command not just those supported by the IDE integration. This was even more annoying in case you wanted to use custom script or command provided by a plugin. Now you can use context action to display the command dialog.

When invoked it displays the listing of all available commands and you can directly start typing the prefix of your command. Just by hitting enter you can run it. It would be even better and faster if the context action had a keyboard shortcut. This is not possible at the moment but planned for M3.

Other notable fixes are automatic classpath update on plugin installation (thanks Sven ;) ) and workaround for very very annoyning issue where the EDT was blocked on text selection.

I hope you'll like this.


Awesome! Keep up the excellent progress, as many Grails developers like me eat this stuff up and flaunt it in front of our other Java-purist teams ;)

Posted by Bob on February 25, 2009 at 09:59 AM CET #

Kudos to NB dev team for such needed improvements in grails/groovy integration. Unfortunately, the eclipse groovy/grail plugin is rudimentary at best.

Now you need to focus on the testing integration. Running tests with ant is very slow and unproductive.

Posted by Raphael on February 25, 2009 at 10:07 AM CET #

Thank you for your efforts. I look forward to the release of NetBeans 6.7.

Posted by Ed.T on February 25, 2009 at 11:36 AM CET #

Great job. Thanks for the hard work to make this possible.

Posted by Travis on February 25, 2009 at 01:00 PM CET #

Thanks for the great work on the Grails/Groovy Netbeans plugin. I've been using the dev builds and it's been stable and fast. I have two minor requests:
Post updates to your blog more often - let us know when you check in new fixes/features. We'll be happy to test drive them.
The one thing I miss is being able to run a Groovy script from the scripts/ folder within Netbeans.
Again, thank you for the great job.

Posted by pratik patel on February 25, 2009 at 07:28 PM CET #

Many thanks for the information.

As a Grails and maven user, i would like to call maven goals in a grails project.
How could it be possible ?


Posted by Another Raphaël on February 26, 2009 at 12:40 AM CET #

It's so cool!
Thank you for your effort!

Posted by Pan Feng on February 26, 2009 at 01:45 AM CET #

Great work !!!

I probably missing something. I have downloaded NetBeans 6.7 M2 today with Groovy and Grails plugin, but can not get code completion for dynamic methods. Other enhancements are working.


Posted by Peter on February 26, 2009 at 08:08 AM CET #

is the variable you are trying to complete on typed? There is only limited type inference, so maybe this could be the reason. Can you send me snippet of your code (via email) so I can investigate?


Posted by Petr Hejl on February 26, 2009 at 08:16 AM CET #

pratik patel,
you can run the script via the "Run Grails Command..." - not that straightforward, I agree. Perhaps you would expect Run from context menu of the script, right?


Posted by Petr Hejl on February 26, 2009 at 08:49 AM CET #

Hi Petr,

Is there any advance on font & color control for groovy editor in NB6.7

Posted by Juan Salvador on February 26, 2009 at 01:49 PM CET #


Good progress ... but still missing lot of auto completion functionality.
The most missing feature is - auto completing variable names - for me it is a real stopper for using groovy.
And grails GSP tags completing would be very neat too.

Keep up your good work Petr - mainly on auto completion support. It's nice that groovy is a dynamic language but I guess that without proper auto completion support I'm still faster when writing applications in pure java.

By the way ... are you a czech guy (me too :-) ??


Posted by Dunsun on February 28, 2009 at 07:10 AM CET #

Hi Petr,

I've been looking the new features in NB 6.7 M2, as you explained in this blog.

When I go to Tools/Options/Font and colors/"Groovy Server Pages" a I choose my options,
they are valid just in the current NB session, for the next one I have to configure
that options in every new session. it's failing to persist those option.

Is there any xml file where those options are kept? so I can handle mannually while
the issue is fixed



Posted by Juan Salvador on February 28, 2009 at 09:01 AM CET #

Pter, that is great!

Thanks, Thanks, Thanks!!

Posted by tek on March 01, 2009 at 10:31 AM CET #

Hi Dunsun,
thanks for the feedback. I filed an issue for that: And yes, I'm Czech ;)


Posted by Petr Hejl on March 02, 2009 at 01:46 PM CET #

Hi Juan,
thanks for bringing this to my attention. I'll look into it and let you know.


Posted by Petr Hejl on March 02, 2009 at 01:50 PM CET #

Why netbeans not provide a united Run/Debug/Profile interface, like Eclipse and IntelliJ IDEA.

Posted by hantsy on March 10, 2009 at 10:24 AM CET #

Gr8 work.
It's very important for Grails to have excellent NetBeans support to progress.
Is there any place where we can comment/contribute to the Grails integration.

Posted by Praveen on March 13, 2009 at 12:23 AM CET #

Hi Praveen,
you can find the basic overview for code contribution here: And you can file an issues (very helpful as well) here: Send me a private email in case you need any help, recommendation or anything else.


Posted by Petr Hejl on March 13, 2009 at 02:11 PM CET #

Great to see improvement in the Groovy and Grails support!

However I still does not get the code completion for my dynamic methods, such as user.findByName(), to work as they are not showned in the list.

I also am very annoyed over the GSP color theme bug ( ) since I am using a dark theme :)

I too think it would be great if you implemented support for groovy color and theme and gps tag completion.


Posted by Syntaxeus on March 24, 2009 at 02:43 AM CET #




Powered by jetty://

I installed Grails 1.1
then Groovy 1.6.1 (using the Windows installer)

Then installed the latest Netbeans IDE 6.7m3 (with Java web and Groovy bundled)

Then created new Grails app, created Book domain class, author, title
Then Generate all (to create controller)
Then configured Bootstrap to create a book

When I do "RUN" on the project (green arrow!) I get the above error.

Looking at Services - Servers, it shows jetty:8080 single server instance running.

I am unable to add other servers (need server plugins!?) but can't find any, so unable to test if same problem with other web app servers Sad

Please advice!



Posted by Kristian Mandrup on April 15, 2009 at 04:35 PM CEST #

what about groovy package support. I mean, really...

Posted by mh on June 01, 2009 at 07:21 PM CEST #

Will there be an update in the near future?

There are still a lot of unfixed bugs, and it is not yet possible to set different grails versions for different projects.

Posted by JavaBar on September 18, 2010 at 09:16 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed

Petr is a NetBeans software engineer responsible for the Groovy & Grails support.


« September 2016