ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay Aravamudhan <avij...@gmail.com>
Subject Re: Repeating a task for a list of directories
Date Wed, 05 Mar 2008 19:14:28 GMT
hi,
if all you are doing is calling a different ant file within each 
subdirectory - you can look at subant 
(http://ant.apache.org/manual/CoreTasks/subant.html)

If your main build file has a target which you want to repeat for each 
subdirectory, use ant-contrib's for or foreach tasks 
(http://ant-contrib.sourceforge.net/tasks/tasks/index.html)
With the ant-contrib option, you will have access to a property that you 
can define which contains the directory name.

hth,
Vijay

Rob Wilson wrote:
> Hi,
>
> I have not done too much with Ant, but I would like to find all
> sub-directories below a given directory and then for each directory repeat a
> task in the context of that directory, so for example
>
> topdir
>    subdir1
>    subdir2
>
> I would like to get ant to repeat a task for subdir1 and subdir2 and have
> access to the directory name within the task - does anyone know how I can
> achieve this?
>
> Cheers,
> Rob.
>
>   

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


Mime
View raw message