Sam
pointed me to some
constructive criticism of Ant. There are many similar criticisms
of Ant out there, most are less rational. Being a fan of both make
and Ant, I usually find myself defending one to the fans of the other.
My first defense of Ant is to say that for Java, Ant is a better
build tool than make. I pointed out in
a prior entry , that the reason make is horrible for Java is more
because of Java than make. But regardless of who is at fault, make is
the wrong tool for building Java.
Ant works really well. The XML is easy. It's easy to read and
easy to write. It keeps the build accessible to mid-level developers.
All the common Java tasks you need are right there, and they work
well. From compile to deploy, Ant has a solution. It just works.
I do have some complaints. I could complain about how hard it is
to extend Ant. (Writing Java code to extend your build tool is just
wrong) I could complain that it's extremely difficult to manage
multiple projects with Ant using a common build system. I could
complain that no matter how well I know how to use my Java tools, I
can't write anything but a trivial build.xml without looking at the
documentation or an existing build file. No matter what Ant's
shortcomings are, there isn't any better solution out there.