ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Ant: The Definitive Guide (Orielly)
Date Wed, 29 May 2002 18:40:58 GMT

----- Original Message -----
From: "Mark Derricutt" <>
To: "Ant Users List" <>
Sent: Wednesday, May 29, 2002 5:39 AM
Subject: Re: Ant: The Definitive Guide (Orielly)

> On Wed, 2002-05-29 at 05:56, Erik Hatcher wrote:
> > To further what Steve has said about our forthcoming book [1,2], we are
> > covering much more than would even be reasonable for the Ant docs.  We
> > lots of real-world situations from web development, XML issues, EJB
> > projects, and Web Services. These involve several 3rd party tools such
> I see your book will cover writing custom ant tasks, how detailed does
> this section go?   The Ant docs on it don't really say much, and the
> only other things I've had said about it is "just look at the code of
> the existing tasks", which doesn't really help either.  Well, not when
> you want to know whats really capable of being done.

Tilly and Burke have a chapter on it, we have about the same, probably
covering the same stuff: methods, lifecycle and attributes.  Likewise each
has a chapter on the other things you can add to ant, listeners, loggers,
and now selectors. (there are filters too, but I think they get neglected by

Nobody looks at how ant really works underneath, at classes like the
infamous IntrospectionHelper, for fear of scaring people (hey, it scares
me!). There is still scope for an 'Ant Internals' book, or at least better
docs in the manual.

We dont go into ant internals primarily because of space and time: once you
start you have to go a fair way, it would add enough pages to bump up the
selling price and slip everything some months. I have some purged stuff on
how to use Ant's junit test helpers to test your classes, that I could stick
into the ant docs; I'll try and do that after beta-2 and before the next
one. It's important to know how to write test build files, as without them
your changes dont go into ant.

Meanwhile, take a look at the ant task guidelines, they arent coding details
, but style hints. It really is so really easy to write ant tasks you
wouldnt believe it:

class MyTask extends {
private File destDir;

 public void setDestDir(File destdir) {

public void execute() {
    if(!destDir.exists() || !destDir.isDirectory()) {
     throw new BuildException("Dest dir "+destDir+" is not a directory, you
    log("executing MyTask",Project.MSG_VERBOSE);
    //your code here


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message