If you want an array of files (such as solution files), then the best way to do it is probably with a fileset.  e.g.

<fileset id="solutions">
    <include name="*.sln" />
</fileset>

then use:

<foreach item="file" property="filename">
    <in>
        <items refid="solutions" />
    </in>
    <do>
        <whatever... />
    </do>
</foreach>

for your releases array, as Si says, it's probably best to just use a comma delimited string.

HTH,

Bill









From "Burgess, Michael" <[EMAIL PROTECTED]>@lists.sourceforge.net
Sent by: [EMAIL PROTECTED]

24/04/2006 22:40


To
<nant-users@lists.sourceforge.net>
cc
Subject
[NAnt-users] NAnt Arrays






Hi there,

In NAnt, how can I can create arrays upon which I can use a 'foreach' command?

For example, I want to be able to specify a few arrays to say then be used like so:

for each solution s in solutions:
for each release r in releases
build
collate

Sorry for the naff pseudo code there! Solutions will contain paths to the VS2003 solution files, whereas releases will just be 'debug' and 'release'. I'm assuming different arrays are needed?

Can anyone help?

Cheers,
Mike.

_______________________________________________________

This e-mail and the documents attached are confidential and intended
solely for the addressee; it may also be privileged. If you receive this
e-mail in error, please notify the sender immediately and destroy it.
As its integrity cannot be secured on the Internet, the Atos Origin group
liability cannot be triggered for the message content. Although the
sender endeavours to maintain a computer virus-free network, the
sender does not warrant that this transmission is virus-free and will
not be liable for any damages resulting from any virus transmitted.
_______________________________________________________


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________




IMPORTANT
The information contained in this e-mail and any attachments is intended for the addressee only
and may contain legally privileged or confidential information. If you are not the intended
recipient you must not use, disclose, copy, distribute, alter, or take any action in reliance
on the information and Avon Insurance plc will not accept liability for any loss or damage howsoever
arising, directly or indirectly in reliance on it and gives no warranty or representation as to its
accuracy or reliability. If you are not the addressee, please notify us immediately on 01789 202121*
and delete the material from your computer and destroy any copies.


Avon Insurance plc reserves the right to monitor and record incoming and outgoing email messages for
the purposes of investigating or detecting unauthorised use of its system and ensuring its effective operation.
Avon Insurance plc will not accept liability for any loss or damage as a result of any virus being passed on.


Avon Insurance plc (No. 209606).
Registered in England. Registered Office: Arden Street, Stratford upon Avon, Warwickshire CV37 6WA.
Authorised and regulated by the Financial Services Authority.
A member of the NFU Mutual group of companies and the Association of British Insurers.


*For security and training purposes, telephone calls may be recorded and monitored.

Reply via email to