Skip to end of metadata
Go to start of metadata

Bogdan Calmac, Knoa Software

As we've recently introduced groovy in our company for scripting, it felt natural to experiment with gant for the build system. As a first project, I created a gant script to package a utility as an exe which involved:

  • Download dependencies using maven-ant
  • Compile the groovy scripts
  • Package the compiled scripts along with all dependencies as a single jar
  • Wrap the jar in a exe using JSmooth
  • SCP the release to our internal server

It was straightforward to translate the ant functionality to gant, and then I could also benefit from the fact that gant is based on a real language and implement directly in the script things that would have otherwise required a custom ant task. After this introduction, here are a few notes based on this short experience:

If you want to use Ivy, there is a classloader issues with groovy 1.5.6 and gant 1.2.0 which resuls in a LinkageError. The solution is to get gant 1.3.0 and install it on top of groovy 1.5.6 (and of course, delete gant 1.2.0 from the lib directory)

When using relative paths in an <import> task, the file cannot be found. I suspect this to be a problem on the groovy side, because I don't have the problem when using ant directly. The solution was to specify the full path as below:

Downloading dependencies with maven-ant is trivial, as it is distributed with gant:

The main downside of my experience was the mediocre IDE support for groovy (eclipse in my case). This has nothing to do with gant which is a great tool, and I wasn't sure if it's appropriate to mention it here, but it's still part of the experience, so I said it ...

  • No labels