ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: [myrmidon] Project/Target as Tasks
Date Sun, 21 Apr 2002 04:40:46 GMT

Note this for a proposal for Ant2 and not the main tree...

On Sun, 21 Apr 2002 14:26, Ara Abrahamian wrote:
> I like that idea! And I think we even need to go further.

already have ;)

> For example in xdoclet we have a task and a set of subtasks, the same
> is true for ejbjar. subtask is really a task but is run inside an
> unmrella task. Now if we could generalize it and let Ant do the job
> (calling validate/run on subtasks, etc too) then that would be
> beautiful.

ALready possible in what we have going. It is currently only lightly 
documented but you can get what documentation available under "Typed 
Elements" heading on

Basically what it means is you define a pluggable type via an interface and 
then you add a line to a descriptor for each implementation (ie for each 
XDoclet subtask you just add a new descriptor line and ant automatically 
picks it up).

> And even more, generalize data types too. I mean fileset for example
> does something, right? It can be modeled to have a run method and be
> runnable to. Inside run() it does the directory scanning and setting up
> the set in that method.

again already possible.

> Also this way we can really make composition of different tasks
> possible (say embed uptodate inside a copy, so that you enhance the
> functionality of copy with uptodate checking).

Currently it is only possible to add in extra functionality where the task 
writers specifically enable it. However if you want to write tasks that 
aggregate other tasks together then that should also be possible. You will be 
able to define templates via some mechanism then use instances of templates 
just like normal tasks.

> I don't know much about Ant's internal architecture, what do you think
> about the above proposal?

I like it but then again I been campaigning for it for over a year ;)


Peter Donald

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

View raw message