ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laird J. Nelson" <lairdnel...@comcast.net>
Subject RE: just not getting it
Date Mon, 11 Aug 2003 02:18:27 GMT
> -----Original Message-----
> From: Gregory Seidman [mailto:gss+ant@cs.brown.edu]
> I'm trying to understand the basic concept of Ant, and I'm
> just not getting
> it.

[snip]

> I'm sure that part of the problem is that I am looking at this through
> make-colored glasses.

Without meaning the slightest bit of disrespect to any of the folks who
have taken the time to answer your post, I don't think they addressed
your core concern.

Briefly: an Ant target is like a make "phony" target that can only have
other "phony" targets as prerequisites.  Ant, while it does have
*features* that *can* enable dependency checking, etc. does not
*inherently* rely on file-based dependency checking like make does.  So
it is wrong to simply say that an Ant target is like any make target.

An ant task is equivalent to a make command (the part after a tab).
Instead of writing shell scripts to do things when targets are invoked,
you write Java classes and front them with
(fairly-ugly-but-it-gets-the-job-done) XML syntax.  One Ant task, to
take an example, copies files from one location to another, a job you
might perform in make by typing "cp $FILES $DESTINATION".

> Would someone please explain how to handle the simple example of a
> directory/package tree full of .java source files to be built
> into a JAR?

Others have gone over this, but again, the core difference between make
and Ant is that in make file dependencies are at its very core.  Not so
with Ant.  There are good things about this and bad things about it.

Finally, from a historical perspective--and again, I mean no disrespect
here--Ant began from frustration, as do most open source projects.
Someone got hacked off at make, said, "Why does this have to be so
COMPLICATED?", decided to strip out all the unnecessary stuff, and came
up with a task invocation framework (basically).  As Ant has progressed,
the developers are beginning to realize just WHY make is so complicated
(should properties be interpolated once?  Many times?)  :-)  However,
there is a different flavor to both tools, and you should obviously use
whichever is easier to work with.  Personally, I like Ant better,
because although it's less solid and hasn't been around for as long as
make, it's an ugly little tool that knows it's ugly and gives you enough
warts and handles to be able to wrestle a project to the ground with it.
Or, to put it another way, with Ant you fight the tool for about half an
hour to get what you want, whereas you can spend WEEKS fighting make to
get it to do something that isn't quite what you want.  :-)

Cheers,
Laird


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message