Did you know? DZone has great portals for Python, Cloud, NoSQL, and HTML5!

Andres is a DZone Zone Leader and has posted 135 posts at DZone. You can read more from them at their website. View Full User Profile

From Ant to Gant

04.28.2008
Email
Views: 3581
  • submit to reddit

Andrew Glover is the first to report on Gant's latest trick: a converter from Ant to Gant. With this little script you'll be able to replace those ugly angle brackets with nice and cool Groovy code in no time. So if you were holding back on trying out Gant because that would mean you have to rewrite your build scripts from scratch, take ant2gant for a spin and be Groovy, and if you do please be sure to send some feedback to the Gant dev team.

For those new to Gant, here is a teaser taken from the project's site

includeTargets << gant.targets.Clean
cleanPattern << [ '**/*~' , '**/*.bak' ]
cleanDirectory << 'build'

target ( stuff : 'A target to do some stuff.' ) {
println ( 'Stuff' )
depends ( clean )
echo ( message : 'A default message from Ant.' )
otherStuff ( )
}

target ( otherStuff : 'A target to do some other stuff' ) {
println ( 'OtherStuff' )
echo ( message : 'Another message from Ant.' )
clean ( )
}

setDefaultTarget ( stuff )

 

Tags:
Published at DZone with permission of its author, Andres Almiray.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)