Groovy integration with Java SE projects
After few weeks spent on NetBeans 6.1 release I am back in development of Groovy and Grails plugin which will be official part of 6.5 release. In few following posts I will try to track progress we made recently in all the areas. Today I am covering integration with the Java SE projects. Standalone Groovy project was dropped some time ago and there was no direct replacement for a while. Now it is possible to develop your Groovy application in NetBeans Java SE project without manipulating build script and project classpath. All is done automatically when you create first Groovy class or script in the project (there is also note about that in the bottom part of the panel:
You can do the same thing in project properties panel:
What it does, should be clear from last screenshot – adds groovy-all jar on classpath, modifies IDE-controlled build script (basically wraps javac by groovyc) and excludes *.groovy files from result project’s jar.
There is also groovy-all library available under Tools->Libraries once you have Groovy plugin installed:
Some work has been also done in the integration of Groovy in Java source code, thanks to work done by Tomas Zezula on Java infrastructure side. Now all Groovy classes in project behave as any regular Java classes (they appear in code completion, fix imports, etc…):
Some work still needs to be done, but don’t wait, try it and provide early feedback, so we can integrate your suggestions before Milestone1.
Now on different topic – I will be in San Francisco for the JavaOne from Saturday, so if you want to discuss things personally, you can reach me there. Just send me an email at martin dot adamek at sun dot com






Martin,
did you say that I need to download the Dev build ? When I downloaded the 6.1 release it seemed like the Groovy/Grails plugin could not install as it depended on an older api (gsf/2 maybe??).
Also, is Groovy debugging somewhere on the radar ?
Just in case you don’t hear it often enough, YOU ROCK !!!
This Groovy seamless integration in NetBeans looks really awesome! Keep up the great work Martin, and I hope to see you at JavaOne!
Martin,
any chance us users of NB 6.1 can get some version of the Groovy/Grails plugin for use until it becomes official in 6.5? I’m sure I’m not alone in my hope to use it now rather than having to wait.
Unfortunately there is no reasonable way to get in 6.1. Few people tried to add dev update center to their 6.1 final, but that is not recommended – you’ll end up with basically same thing what dev build is. The main problem is that we are using some post-6.1 APIs to get some features.
Good,please keep up the great work !