views:

393

answers:

4

Is it really advantageous to move to Rake from ant?

Anyone migrated from ant and find something monumental?

FYI: Current environment is Ant for J2ME builds

+1  A: 

You might want to check out buildr as well. It's a higher-level build-tool built on rake. IMHO it takes a lot of the good features from maven, and throws away the bad-ones. I haven't used it in anything big myself but I know people who have and are quite happy with it.

auramo
It's now graduated (not in incubator anymore): http://buildr.apache.org
inger
A: 

Another tool that you might want to check out is Gant if ant isn't meeting your needs. It adds full blown scripting support to ant but allows you to re-use your ant tasks as needed. It really depends on what you don't like about ant.

Peter Kelley
+4  A: 

Rake is great if you want:

  • Access to a real programming language; conditionals and loops are all dead-simple, compared to Ant (in which they are nigh-impossible)
  • File format that is easy to read and can be syntax checked
  • More intuitive/predictable assignment of values to variables

Rake is bad for you because:

  • You need to provide a lot basic of the tasks (like running javac, creating jar files, etc.) yourself. Projects like Raven might help, but it seems geared toward auto-downloading dependencies and not so much automated a build/deploy process. Plus, the documentation is a bit lacking.
  • Most java tools that can be automated are done as Ant tasks, which aren't easily runnable from Rake; starting up the JVM can be annoying at build time
davetron5000
+5  A: 

I would say yes, but I have a different perspective than a Java-environment guy, because I'm a .NET-environment guy. I had written and maintained a non-trivial build script (clean, generate-assembly-info, build, test, coverage, analysis, package) in msbuild (MS' XML-driven NAnt effort) and it was very painful:

  • XML isn't friendly; it's very noisy
  • No-one else on the team was interested in learning it to the point of performing more, and more useful, automations; so high bus factor (ie, if I get hit by a bus, they're stuck with it)
  • It did not lend itself to refactoring or improvement - it was one of those 'touch-at-your-peril' things, you know?
  • It needed custom C# tasks to be written to run the various tools the build needed (though to be fair, often these are written by the vendors)

In about a work-week's worth of my time (got to love empty offices at Christmas time!), I've learned enough ruby+rake to replace the whole thing with a shorter (in terms of LOC) script with slightly more functionality, and more understandability (I hope, anyhow; haven't had it reviewed yet).

It benefits from: - It's a new language, but a real language. My team-mates like learning new languages, and this, while a thin excuse, is still an excuse ;-) This might mitigate the bus-factor if I'm right. - It's a short hop (I gather) from here to capistrano, the automated/remote/distributed deployment tool from the RoR world. Despite being an MS-stack shop, we're gonna be using that in combination with IIS7 finally having a CLI config tool.

So, yeah. Your mileage may vary, but it was worth it for me.

Peter Mounce
Since then, I've created http://github.com/petemounce/rake-dotnet to package up what I learned and share it.
Peter Mounce