Over a million developers have joined DZone.

From Ant to Gant

· Java Zone

What every Java engineer should know about microservices: Reactive Microservices Architecture.  Brought to you in partnership with Lightbend.

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 )

 

Microservices for Java, explained. Revitalize your legacy systems (and your career) with Reactive Microservices Architecture, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}