----- Original Message -----
From: "Stefan Lecho" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 15, 2001 11:06 AM
Subject: Passing multiple files to java task
> In my build file I want to execute a java program,
> which takes exactly one parameter, a couple of times. The files
> to be used as parameter should be collected and then
> passed one after the other to the java class.
>
At least in Ant 1.3 beta2:
<execon executable="somecommand" parallel="false" >
<arg value="arg1"/>
<srfile/>
<arg value="arg2"/>
<fileset dir="/tmp"/>
</execon>
invokes somecommand arg1 SOURCEFILENAME arg2 for each file in /tmp replacing
SOURCEFILENAME with the absolute filename of each file in turn. If parallel
had been set to true, SOURCEFILENAME would be replaced with the absolute
filenames of all files separated by spaces.
Nico