Re: Ant considered harmful was Re: JSP still relevant
On Sat, 27 Jun 2009, Mike Schilling wrote:
Tom Anderson wrote:
On Sat, 27 Jun 2009, Arved Sandstrom wrote:
Tom Anderson wrote:
[ SNIP ]
The 'if' task in ant (actually ant-contrib - and don't get me
started on how much i hate ant) looks like:
[ SNIP ]
I'm a shit disturber...I don't mind getting you started on how much
you hate Ant. :-)
I'm no fan of it either.
Right, time for a hate-on-ant thread!
It's a build system that can't express "A depends on B" in a conmsistent
fashion. Enough said.
I'm not sure about that. Make and ant have different philosophies - make
is about a tree of dependencies, where you build a target by building all
its dependencies, and ant is about a sequence of steps, where you build a
target by executing all the steps for it. It's analogous to the difference
between functional and imperative languages. If you prefer make's
philosophy, you won't like ant, but that doesn't mean it's objectively
better.
My opinion of this difference is coloured by the fact that i don't use
build tools to do partial rebuilds, which is the bread and butter of the C
developer - i have Eclipse to do all that sort of thing for me. Rather, i
use the tools to carry out the process required to move from a project
freshly checked out from CVS to a running JBoss instance - compile the
code, package a JAR, construct WARs and EARs, do various incantations
required by the framework we use, make datasource XMLs, clear out the
database, define all the tables, import the initial data, etc. That's a
process in which every step is carried out every time, so the idea of
checking dependencies doesn't seem very useful.
Now, it's true that if i'm developing, rather than setting up a production
machine or something, many of these steps could be skipped: if i haven't
changed the database definition, there's no need to recreate the tables
from scratch, just to empty out their contents. That's somewhere a
make-like system could be useful - if i had a local file that was a totem
for the database, so its last-modified date corresponded to the when the
database was last rebuilt, i could have a target which rebuilt the
database only if the SQL had changed. But i'm not convinced this would be
that useful - the complete rebuilds i do are fairly infrequent (a few
times a day), fairly quick anyway (a few minutes), and are for the kind of
purpose where you'd want to do a 'make clean' anyway (checking everything
works before committing to CVS etc). Still, i could be wrong; i'll have to
think about this.
tom
--
buy plastic owl