ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: multiple args to java task
Date Tue, 21 Oct 2003 15:40:48 GMT
> From: peter reilly [mailto:peter.reilly@corvil.com]
> 
> I am not too sure I understand.
> An element to a macrodef can be optional, but if it not present, the
> macro will simply not place it in the macro instance.
> 
> One can emulate <apply/> for <java/> using a <foreach/> task or **NEW**
a
> <for/> task from antcontrib.
> 
>     <path id="xml_files">
>         <fileset dir="." includes="**/*.xml"/>
>     </path>
> 
>     <for param="arg">
>       <path refid="xml_files"/>
>       <sequential>
>         <java classname="Echo" classpath="classes">
>           <arg value="${arg}"/>
>         </java>
>       </sequential>
>     </for>

Only in 'serial' mode Peter, and not in 'parallel' mode. It's enough for the
question asked, but I'm thinking of a solution that uses <apply
executable="java">, which should be better (leverages the full power of
<apply>). I ever used <foreach> one time only for prototyping, before
re-implementing the functionally in a custom task, and I always feel using
<for> or <foreach> is the wrong route. --DD

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


Mime
View raw message