ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Blanc <Sebastien.Bl...@alcatel.com>
Subject Re: AW: how to execute <ant> task in a set of directories?
Date Mon, 24 Mar 2003 06:03:21 GMT
Hi !
just did that this afternoon, a bit creepy but works to execute a task on
subdirectories dynamically - here with the relative directory name given as
input parameter of the task:

<path id="daof.path">
        <pathelement path="./xml" />
</path>
<pathconvert property="daofpath" refid="daof.path" pathSep="" />

<path id="${dao.path}">
 <dirset dir="xml">
         <include name="*" />
 </dirset>
</path>
<pathconvert property="daopath" refid="${dao.path}" pathSep=",">
   <map from="${daofpath}" to="." />
</pathconvert>

<foreach param="base" list="${daopath}" target="t_generate">
        <param name="ext" value="DAO.java"/>
</foreach>

seb.

Jan.Materne@rzf.fin-nrw.de wrote:

> Maybe <subant> of CVS head support filesets. Another possibility is using
> <foreach> of AntContrib combined with <ant>.
>
> There was a discussion on that topic ... <<searching>>
>
> Yep, discussion starts on
>   http://marc.theaimsgroup.com/?l=ant-dev&m=104756994324333&w=2
>
> Jan Matèrne
>
> > -----Ursprüngliche Nachricht-----
> > Von: Jason Novotny [mailto:novotny@aei.mpg.de]
> > Gesendet am: Samstag, 22. März 2003 13:34
> > An: user@ant.apache.org
> > Betreff: how to execute <ant> task in a set of directories?
> >
> >
> > Hi,
> >
> >     I have some set of directories say a/ b/ c/ and d/ each
> > with their
> > own build.xml script. How can a top-level build script invoke
> > the build
> > script in each of the subdirectories without knowing the
> > directory names
> > a priori?
> >
> >     Thanks a lot, Jason
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message