ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <>
Subject Java Development with Ant (was: Re: Ant: The Definitive Guide (Orielly))
Date Thu, 30 May 2002 03:54:23 GMT

----- Original Message -----
From: "Mark Derricutt" <>

> 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.

I don't recall whether Steve answered this specifically earlier today,

We have a chapter on writing custom tasks, which covers how Ant's
introspection works and the necessary naming conventions (setXXX, addXXX,
etc) to add attributes and elements. It covers how to get datatypes
supported like FileSet and Path.  Developing wrapper tasks for native O/S
programs and Java programs gets special attention and examples because these
are important reasons (native O/S particularly) for writing custom tasks
(and we say, "make sure <apply> won't work for you before diving into
writing a custom task" :).  Bits of Ant's API is covered, but not
extensively (as we do refer you to Ant's Javadocs and source code too) -
things like DirectoryScanner gets covered a little, as well as useful things
like Project.getProperty/setNewProperty.

Also, as an added 1.5 bonus, coverage of the new DynamicConfigurator is

So, all in all, I'd say we do solid coverage of writing custom tasks and a
skilled Java programmer could take that information and quite easily write
custom tasks right away.

Also, another chapter deals with writing custom
listeners/loggers/selectors/mappers and <script>.  Writing a custom selector
is actually quite easy and powerful - many thanks to Bruce Atherton for this
gem of a contribution!

I'm not sure which chapters Manning will post online, but the custom task
development chapter is one I'm specifically pushing for so that it can
directly benefit the community.


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

View raw message