You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Pete O'Donnell <po...@doradosoftware.com> on 2000/10/26 21:40:04 UTC

ant calling ant calling ant

i am trying to use ant to traverse down through directories.  i.e.  dir1 is
root. under that sub1 and sub2. under sub1 is subsub1.  all directories have
build.xml's.  lets consider the build.xml file in sub1.  and use the failing
call as an example:

from root/sub1/build.xml:
	...
	<target name="clean">
              <delete dir="." includes="*.class"/>
	  <ant dir="subsub1" target="clean">
  	</target>

i want each build.xml to be responsible for (in clean's case) deleting all
class files in it's own directory and then calling ant clean on all
subdirectories.  the error message i get when running 'ant clean' from the
root directory is subsub1/build.xml not found.

is ant getting lost or is it just me.  please help,

thanks,
-pete


Re: ant calling ant calling ant

Posted by Oliver Boehm <bo...@Informatik.BA-Stuttgart.De>.
Pete O'Donnell wrote:
> 
> i am trying to use ant to traverse down through directories.  i.e.  dir1 is
> root. under that sub1 and sub2. under sub1 is subsub1.  all directories have
> build.xml's.  lets consider the build.xml file in sub1.  and use the failing
> call as an example:
> 
> from root/sub1/build.xml:
>         ...
>         <target name="clean">
>               <delete dir="." includes="*.class"/>
>           <ant dir="subsub1" target="clean">
>         </target>

try something like this:

  <target name="clean">
    <delete>
      <fileset dir="."
	       includes="**/*.class"
      />
    </delete>
  </target>

hope that helps
Oliver
-- 
Oliver Böhm
mailto:boehm@ba-stuttgart.de
http://www.ba-stuttgart.de/~boehm