ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: how to execute the same task for a set of files
Date Thu, 23 May 2002 22:50:56 GMT
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

-----Original Message-----
From: Olivier Gourment [mailto:ogourment@yahoo.com] 
Sent: Thursday, May 23, 2002 5:44 PM
To: ant-user@jakarta.apache.org
Subject: how to execute the same task for a set of files


Hi there,

I want a task to be executed on several files that match a pattern
(*.java for example). I looked in the documentation but didn't find
anything. I don't believe the Ant task can be executed on a fileset, or
that the build file include wildcards? No luck with targets either...
I'm open to any suggestions...
Thanks,

    Olivier



__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

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

--
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