| AW: AW: how to execute <ant > task in a set of directories? | AW: AW: how to execute <ant > task in a set of directories? 2003-03-28 - By Jan.Materne@(protected)
Yep, Ant makes my breakfast coffee, cleans my clothes ...
For future questions: keep on the mailing list. There are many more people and with that huge knowledge a solution is much more nearer.
Jan Mat?rne
> -----Urspr?ngliche Nachricht----- > Von: Jason Novotny [mailto:novotny@(protected)] > Gesendet am: Freitag, 28. M?rz 2003 12:49 > An: Jan.Materne@(protected) > Betreff: Re: AW: how to execute <ant> task in a set of directories? > > > Ah, of course-- thanks a lot-- I see I'm still an Ant novice. I'm > always amazed at how powerful it is! > > Thanks, Jason > > Jan.Materne@(protected) wrote: > > > Not tested code. > > > > <target name="compile-projects" depends="compile" > description="Compile > > all subprojects"> > > <foreach target="compile-project" param="thisEnv"> > > <path> > > <!-- Includes only directories. If there is none, the > > compile-project --> > > <!-- shouldn?t be invoked --> > > <dirset dir="${projects.dir}" includes="*"/> > > </path> > > </foreach> > > </target> > > > > <target name="compile-project"> > > <!-- Because you are using <foreach> of AntContrib, the <if> is > > also available --> > > <if> > > <available file="${thisEnv}/build.xml"/> > > <then> > > <ant dir="${thisEnv}" target="compile"/> > > </then> > > </if> > > </target> > > > > > > Jan Mat?rne > > > > > > > > > > > -----Urspr?ngliche Nachricht----- > > > Von: Jason Novotny [mailto:novotny@(protected)] > > > Gesendet am: Freitag, 28. M?rz 2003 10:59 > > > An: Jan.Materne@(protected) > > > Cc: user@(protected) > > > Betreff: Re: how to execute <ant> task in a set of directories? > > > > > > > > > Hi, > > > > > > Sucess is when I have one or more directories within > > > ${projects.dir} > > > and each one contains a build.xml and failure is when there are no > > > directories in ${projects.dir} > > > > > > Thanks, Jason > > > > > > Jan.Materne@(protected) wrote: > > > > > > > What do you want to have? > > > > Can you give me a success-usecase? > > > > > > > > > > > > Jan Mat?rne > > > > > > > > > > > > > -----Urspr?ngliche Nachricht----- > > > > > Von: Jason Novotny [mailto:novotny@(protected)] > > > > > Gesendet am: Donnerstag, 27. M?rz 2003 20:59 > > > > > An: Jan.Materne@(protected) > > > > > Betreff: Re: AW: how to execute <ant> task in a set of > > > directories? > > > > > > > > > > > > > > > Hi Jan, > > > > > > > > > > Thanks for your advice and I noticed you helped someone > > > > > else with a > > > > > similar problem-- now I'm doing the following: > > > > > > > > > > <target name="compile-projects" depends="compile" > > > > > description="Compile > > > > > all subprojects"> > > > > > <foreach target="compile-project" param="thisEnv"> > > > > > <path> > > > > > <dirset dir="${projects.dir}" includes="*"/> > > > > > </path> > > > > > </foreach> > > > > > </target> > > > > > > > > > > <target name="compile-project" > > > > > > <ant dir="${thisEnv}" target="compile"/> > > > > > </target> > > > > > > > > > > This seems to work fine for my purposes except when the > > > > > ${projects.dir} > > > > > has no directories in it-- do you know how I can easily check > > > > > and handle > > > > > this case? > > > > > > > > > > Thanks very much, Jason > > > > > > > > > > > > > > > > > > > > > > > > > Jan.Materne@(protected) 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 > <http://marc.theaimsgroup.com/?l=ant-dev&m=104756994324333&w=2> > > > <http://marc.theaimsgroup.com/?l=ant-dev&m=104756994324333&w=2 > <http://marc.theaimsgroup.com/?l=ant-dev&m=104756994324333&w=2>> > > > > > > > > > > > > > > >Jan Mat?rne > > > > > > > > > > > > > > > > > > > >>-----Urspr?ngliche Nachricht----- > > > > >>Von: Jason Novotny [mailto:novotny@(protected)] > > > > >>Gesendet am: Samstag, 22. M?rz 2003 13:34 > > > > >>An: user@(protected) > > > > >>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@(protected) > > > > >>For additional commands, e-mail: user-help@(protected) > > > > >> > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
|
|
 |