ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kiarna Boyd" <kia...@hotmail.com>
Subject Re: foreach directory copy question
Date Tue, 25 Mar 2003 17:29:16 GMT
Hi Jan,

(sorry for duplicates but I wanted you to get my THANK YOU!!!!)

I finally figured out what you were trying to explain.
I was confused about the logical relationship between the foreach task and 
the overall target task.

So I applied your suggestion:

<target name="newversion" >
<foreach target="test" param="thisEnv">
        <path>
                <dirset dir="${builddir}/" />
        </path>
</foreach>
</target>
<target name="test" >

        <echo>"${thisEnv}"</echo>
</target>


It works sweet! I just have to figure out how to limit the dirset output to 
top level directories rather than including all the sub dirs.

Thanks again for all of your help. I really appreciate it!

-Kiarna












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>

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


Mime
View raw message