The Source for Java Technology Collaboration
User: Password:



Kohsuke Kawaguchi

Kohsuke Kawaguchi's Blog

Hudson Gant plugin

Posted by kohsuke on July 17, 2007 at 10:41 AM | Comments (5)

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.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • There is a now a fix in Subversion Head for the bug you mention, so the bad news is no longer bad :-) If you could give the fix a test I will then make a 0.3.1 release of Gant.

    Posted by: russel on July 18, 2007 at 01:03 AM

  • It is amazing how looking at a problem from a different direction can yield a result! I was so focused on Gant itself that I didn't even consider using the shell script to solve the issue. Yeeesh, thanks for the pointer-- indeed, it is much simpler. Keep up the great work!!

    Posted by: aglover on July 18, 2007 at 06:03 PM

  • Gant release 0.3.1 now out with the fix, see http://groovy.codehaus.org/Gant.

    Posted by: russel on July 18, 2007 at 10:49 PM

  • Thanks for the quick bug fix, Russel!

    Posted by: kohsuke on July 19, 2007 at 09:08 AM

  • Just to let people know that Gant is now a project in its own right, see http://gant.codehaus.org, and is now at revision 1.0.2. There is now a range of return values to better distinguish errors in execution.

    Posted by: russel on January 02, 2008 at 01:58 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds