Skip to main content

Hudson Gant plugin

Posted by kohsuke on July 17, 2007 at 10:41 AM PDT

I noticed that nice folks at Stelligent are talking about using Gant inside Hudson. They are saying that to run Gant you'd need to run a shell script and then invoke Gant. They then digress to work around a problem that can be more easily fixed by using cd before invoking Gant.

But anyway, I believe things should be easy and intuitive, so I thought maybe I'd just write a plugin to integrate Gant to Hudson, just to show how easy it is to write a plugin like that. The good news is, I was able to do the whole thing in just about an hour. The bad news is that due to a bug in Gant, Hudson doesn't notice if the build failed or not.

Here's the usage. The plugin works much like Ant builder, and using it is very easy. You basically just need to specify the Gant targets that you want to run:

If 'gant' is not in PATH, or if you have multiple Gant installations and need to be able to configure which project uses which Gant, then you can go to the system configuration and tell Hudson where your Gants are:

As usual, the form validation works here and so if you specify a wrong directory it will tell you so. You can download the plugin from here.

Once again, the point I'm trying to make here is that writing a Hudson plugin is really easy (although this exercise made me realize that there are several things I can further improve), so please think about writing ones for the tools you are using, and sharing them with the community! I'm always happy to help.

Related Topics >>