ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Re: how to execute the same task for a set of files
Date Fri, 24 May 2002 07:35:24 GMT

----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Thursday, May 23, 2002 3:50 PM
Subject: RE: how to execute the same task for a set of files


> It actually depend what you want to do...
>
> If you want to execute 1 Java command for a bunch of Java files, and the
> Java command takes all the sources on it's command line, you can. You
> convert the <fileset id="files"> to a <property name="files"
refid="files">
> and simply call <java ...><arg line="${files}></java>
>
> If on the other hand you want to execute 1 Java command for each Java
file,
> then your out of luck... Ok, not really. Either use <script>, or
> ant-contrib's <foreach> task (search archive for more info on it).
>
> Maybe there should be an equivalent of <apply> to <exec> for <java>.
--DD

it has a working name, <javaon>, just not an implementation.

The apparent rationale is to encourage you to write such things as ant tasks
instead, with dependency checking, more usable argument setting and better
re-use all round. Maybe that is valid, sometimes it is v inconvenient.


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message