Thank you Erik. Both of those are great examples of nesting tasks.

I was thinking about my problem wrong though. I should have been using a
custom type. I have a task that produces XML reports and writes them to
disk. I wanted the task to take a set of nested elements that describe the
list of reports to create.

Unfortunately my problem is now finding where the typedef element is
expected in the build file. I assume that it should be in the project
element before it is used.

Ant gives me the following error whereever I put the typedef element:

10: Unexpected element "typedef"


G. Angus McCollum

-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 5:42 PM
To: [EMAIL PROTECTED]
Subject: Re: Are all nexted elements implemented as DataType extensions?


Have a look at the Sequential and Parallel built-in Ant tasks (in Ant 1.4).
They implement TaskContainer.  That should point you in the right direction
for implementing a task that contains other tasks.

    Erik


----- Original Message -----
From: "McCollum , Angus" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 26, 2001 1:43 PM
Subject: Are all nexted elements implemented as DataType extensions?


> I created a custom Ant task with a nested element. I had writen the nested
> element as a Task but failed to get the addXXXX method called on the
> enclosing task.
>
> I took a look at the Ant source and noticed that all the examples I found
> used nested element that were DataTypes and not Tasks. Is this always the
> case? Should I have structed my nested element as a DataType and not a
Task?
>
> Thank you in advance.
>
> G. Angus McCollum
>

Reply via email to