Geertjan's Blog

  • October 26, 2007

Generating Ant Targets for Groovy Compilation and Groovydoc

Geertjan Wielenga
Product Manager
Jeremy Rayner's interview on Javalobby, where he talks about Groovydoc and the related Ant task, got me thinking about a simple extension to the Java Application project type. Extending existing project types is possible from 6.0 onwards, as explained in this tutorial. So I added a new panel to the project customizer for Java applications, which looks as follows:

Assuming both checkboxes are selected, the user now has (assuming OK is clicked) two new Ant scripts in the nbproject folder:

Let's look at each of them. Here's exactly what you get:

And now you need to add those JARs (in the case of the Groovydoc script, you need a snapshot build, since it isn't supported yet officially) and then simply use those Ant scripts. It would be really cool if they would be linked into the main build.xml, automatically, in the same way as the build-impl.xml is. However, I am not sure if that is possible to do automatically. Although, actually, I think I've done something similar before. I need to investigate that.

At any rate, I will add the sources of the module that provides this functionality to http://nbgroovysupport.dev.java.net/.

Join the discussion

Comments ( 1 )
  • Stefan Friday, October 26, 2007

    Very interesting. Until now I needed to create custom Ant scripts in the build,xml (which also works fine).

    One question: does it supports the Joint compilation mode? Most projects have cyclic dependencies between Groovy and Java classes.



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