You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Edwards, Jayme" <JC...@software.rockwell.com> on 2001/07/18 20:17:05 UTC

Batched execution of ant task relative to a directory

Folks,
 
I have a rather large project being entirely built with Ant in which several other development teams contribute by adding their own build subprojects. The directory structure is set up sort of like this:
 
\root
\root\build.xml (main ant script)
\root\services\
\root\services\<someservicefolder>\build.xml (subproject ant script)
 
Right now when someone wants to add a new service they have to add a new target in the main ant script to call ant on their subproject. We've had some problems where people editing the main script screw things up and I want to get away from the subteams editing the master script. 
 
What I'm wondering is if there is a way to set up a target that basically says "for each subfolder directly off of the "services" folder, if you find a build.xml file inside of it execute ant on it". This would allow me to restrict CVS access to the services folder for subteams and keep the main ant script much cleaner.
 
If there isn't a way to do this today might it be feasible to write a task that simple takes a directory and calls the Ant task directly (with the new task executing the logic to enumerate subfolders of the directory attribute and finding build.xml files)? If so I would be happy to contribute this back to the Ant project if a new task is the only way of doing it.
 
Any input appreciated,
 
Jayme Edwards
Rockwell Software
 

Re: Batched execution of ant task relative to a directory

Posted by Stefan Bodewig <bo...@apache.org>.
On Wed, 18 Jul 2001, Jayme Edwards <JC...@software.rockwell.com>
wrote:

> What I'm wondering is if there is a way to set up a target that
> basically says "for each subfolder directly off of the "services"
> folder, if you find a build.xml file inside of it execute ant on
> it".

Yes, some task that could do this have been submitted to this
list.  You could also take a look at
<http://jakarta.apache.org/ant/external.html#Configure>.

> If there isn't a way to do this today

<anton> is on the list of accepted features for Ant2.

Stefan