ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Seessle" <n...@apache.org>
Subject Re: Passing multiple files to java task
Date Thu, 15 Feb 2001 20:05:35 GMT

----- Original Message -----
From: "Stefan Lecho" <Stefan.Lecho@iconmedialab.com>
To: <ant-user@jakarta.apache.org>
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





Mime
View raw message