ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Zastrow" <zast...@dai-lab.de>
Subject AW: Looping through files in the buildfile
Date Mon, 10 Jun 2002 17:39:58 GMT
There exists a "ForEach ant Task" which should help.
Search the web for it.

Jens

-----Urspr√ľngliche Nachricht-----
Von: Frot [mailto:frot@lycos.at] 
Gesendet: Samstag, 8. Juni 2002 14:25
An: Ant Users List
Betreff: Looping through files in the buildfile

Hi all,

I have two seperate, but simular. problems.


First I would like to create a classpath dynamically using all available library files present
in the projects "./lib" directory.
The classpath (or a property) will look like './lib/mylib.jar,./lib/junit.jar'
I have seen a mail once solving this for the classpath part, but never for the property....
Can someone give an example for both options classpath an property ?


Secondly I would like to call a task for every file present in a directory, somthing like
:

	<loop dir="./database_scripts" files="*.sql">
		<echo message="processing file : ${FILE}" />
		<antcall target="executeSQL">
			<param name="sqlfile" value="${FILE}" />
		</antcal>
	</loop>

note : where ${FILE} is ofcourse each time a different file name.
I guess this would need some special task (loop)  to be implemented, any suggestions on how
to tackle this ???

Thanx,

Fred


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


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


Mime
View raw message