In his BuildLanguage Bliki Entry Martin Fowler says:
“Simple builds are easy to express as a series of tasks and dependencies. For such builds the facilities of ant/make work well. But more complex builds require conditional logic, and that requires more general programming language constructs - and that’s where ant/make fall down.
[I've] concluded … that a programming language is more the way to go and [that ant is] not a good UseOfXml.”
I have to agree that there have been many times that I have wanted to just use a programming language to do my builds. I also agree that XML is not the best format for presenting a human-readable flow of events. Using a simpler format, many Ant tasks could be compacted down to a single line, thus allowing you to see more meaningful information without having to mentally parse all the XML.
But, working in a shop that is set on standardizing things and then sticking to them across all the projects, it is difficult to convince the developers to get past popular and hype technologies. Because Ant is so standard in the Java world, and it is fairly well supported in IDE’s, I would probably choose Ant as a first choice for most projects.
I have used the Ant-Contrib Tasks which provides a set of supplemental tasks for Ant such as iteration, conditional logic, and try/catch logic. Using the Ant-Contrib tasks, I have been able to create small and simple build scripts that would normally have been significantly larger. I have also created a set of common targets that I reuse frequently and pulled them out into a seperate file that I include using an XML entity.
I’m definitely interested in trying out Rake, a Ruby based build environment that Fowler talks about in the same bliki entry.