http://nant.sourceforge.net/nightly/help/tasks/foreach.html

Loops over a list.
<foreach item="String" in="${colors}" delim="," property="color">
    <echo message="${color}" />
</foreach>

with NAnt -D:colors="blue,red"

Or you can use the functions stuff in the nightly builds.

HTHs
Scott

----- Original Message ----- 
From: Curtis Zarger

Hello,

I'm wondering how to call a target multiple times, each time providing the
same argument name, but with different values.  An example is shown below.
The foreach task seems to be close, but I don't see a way to loop across an
array/collection of argument values.

nant -D:color=blue -D:color=red

<target name="echoColor">
            <echo message="${color}" />
</target>

If this can is supported, is there a way to loop on the collection of input
arguments, and also reference them by an index within the collection?



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to