How do I iterate thorugh a directory and subdirectories looking for build.xml scripts and executing them
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Murali_Vemulapalli
Posted On:   Wednesday, October 10, 2001 02:46 PM

Hello ! I am building automated test scripts using ANT. I have a directory hierarchy which contains a driver ANT script. In a particular target, I need to look into all the subdirectories looking for build.xml files and run them with default targets. I know how to get all the build.xml scripts, like < include name="**/build.xml"/> < /fileset> But how do I iterate through this list getting the directory for each and run ant script there. Any suggestions, code examples are greatly appreciated. Thanks a bunch in advance, -- Murali    More>>

Hello !

I am building automated test scripts using ANT. I have a directory hierarchy which contains a driver ANT script. In a particular target, I need to look into all the subdirectories looking for build.xml files and run them with default targets. I know how to get all the build.xml scripts, like





<
include name="**/build.xml"/>

<
/fileset>



But how do I iterate through this list
getting the directory for each and run ant script there.

Any suggestions, code examples are greatly appreciated.

Thanks a bunch in advance,

--
Murali

   <<Less

Re: How do I iterate thorugh a directory and subdirectories looking for build.xml scripts and executing them

Posted By:   Erik_Hatcher  
Posted On:   Wednesday, October 10, 2001 05:42 PM

There are no 'easy' ways to do this that I know of, but here are a few pointers: find the ForEach task in the ant-user/ant-dev e-mail list archives (it allows iteration over a fileset and calls a specified target for each entry in the fileset), or try out some