The only problems with this are:
1. Why not just use the <property file="filename"/> task?
2. What if you always want to enable a homespun task using
<taskdef>, or you always want to set a property according to whether or
not a file/directory/class is available?
John
-----Original Message-----
From: d.rees.l [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 1:55 AM
To: ant-user
Subject: Re: batching of ant task
On 06 Mar 2001 07:56:11 +0100, Stefan Bodewig wrote:
>John D. Casey <[EMAIL PROTECTED]> wrote:
>
>> Is there any way to batch ant targets? something like this...
>>
>> <ant target="main" dir="." output="ant-result.txt">
>> <fileset dir=".">
>> <include name="**/build.xml"/>
>> </fileset>
>> </ant>
>
>Not yet.
>
>There's been an <anton> task submitted to ant-dev a while back, that
>mimicked <execon>. My preference would be to have a <javaon> task and
>make <anton> use it.
>
How about a batch property task instead? Better syntax is certainly
possible, but for example:
<batchpropertytask
<batchproperty name="target" valueslist="clean,build,run" />
<batchproperty name="file" >
<fileset dir=".">
<include name="**/build.xml"/>
</fileset>
</batchproperty>
<ant
antfile="${file}"
target="${target}"
output="ant-result.txt" />
</batchpropertytask>
Then you could slap this around anything you want.
d