[]
Writing Groovy Maven plugins in NetBeans
[ mkleint ] 10:26, Friday, 25 April 2008

When updating the mojo.codehaus.org svn repository, I noticed there's a new maven plugin in the sandbox with a cool name: "IANAL Maven Plugin" . I've opened the project in NetBeans to see what the plugin does. However the plugin seems to be written in Groovy, not Java. So I installed the latest Groovy support in NetBeans from the update center. To get the right editor colorings and everything. And also to figure if it works with Maven based projects. It worked. Sort of. I got a few red underlines meaning the classpath was not right. An email exchange with the Groovy support devs confirmed my own thoughts that the problem is in the fact that groovy sources are in src/main/groovy folder in Maven projects and this folder is missing on project's sourcepath. So I added it.
The results is here . No red lines in the editor, ready for coding. There's still room for improvement though. Ideally the Groovy sources would appear in a separate Source node under the project's node. Please note that it will only work in the upcoming 3.1 version of Maven support. Coming soon.


Comments
Post a comment









Remember personal info?