ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: foreach directory copy question
Date Mon, 17 Mar 2003 06:45:57 GMT
Have you tried the both (yours and mine)?

You can use a 'test' target
	<target name="test">
	    <echo>${thisEnv}</echo>
	</target>
So you can see, what the foreach will exactly serve.


I haven´t tried the dirset, but regarding the fileset behaviour I think
my foreach version serves a listing of
'theDirectoryWhereYouWantToDoThe_ls_'.
You can use includes/excludes - I think.

But your script seems to be ok. Once again: have you tried it?


Jan Matèrne

-----Ursprüngliche Nachricht-----
Von: Kiarna Boyd [mailto:kiarna@hotmail.com]
Gesendet am: Freitag, 14. März 2003 17:02
An: user@ant.apache.org
Betreff: AW: foreach directory copy question 


Thank you very much Jan. I appreciate your help!

You suggested I try something like:


<foreach target="newversion" param="thisEnv">
    <path>
        <dirset dir="theDirectoryWhereYouWantToDoThe_ls_" />
    </path>
</foreach>




In order to have the foreach get a new directory each time what would I have

to do?
I thought I would have to build the foreach to reference a text list.

<foreach list="${dev.env}">
                delimiter="${br}">
                target="newversion">
                param="thisEnv">

  </foreach>



  <target name="newversion">
        <echo message="environment: ${thisEnv}"/>
        <copy todir="${builddir}/${thisEnv}">
            <fileset dir="${masterdir}"/>
        </copy>
            </target>


Thanks again!

Kiarna


_________________________________________________________________
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail


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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message