Rake vs. Ant

I wrote a big build script in Rake.  Rake is make for Ruby.  The syntax is basically just Ruby.  Coding in Ruby is pretty easy.

I replicated my rakefile in Ant.  Both the rakefile and ant script work fine but programming in Ant doesn’t feel right.  I was happy to find libraries like ant-contrib that make it possible to do if/then/else type logic in Ant, but coding in XML just feels unnatural.  The good news was that working in Ant wasn’t as bad as it could have been.  Ant tasks are pretty well documented.  Coding custom ant tasks in Java was easy.  It is possible to use scripting in Ant (javascript or ruby or maybe others).  I experimented with it but didn’t end up using the code in the end.

If I had to choose one, it would depend a lot on the environment I was in.  If everyone was already used to using Ant then I’d probably go with Ant.  Likewise for Rake.  If neither was used and we were starting from scratch, I’d pick Rake for sure.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s