title: Pass ant target to multiple build.xml files in subdirectories
body: <p>I have a project with multiple modules, each in its own directory. Each module has its own ant build file (build.xml)</p>
  
  <p>In the root directory I've set up a general build file that calls the build file of each module in the right order.</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;project name="bridgedb" default="all" basedir="."&gt;
    &lt;target name="all"&gt;
      &lt;ant dir="corelib"/&gt;
      &lt;ant dir="tools"/&gt;
      &lt;ant dir="makeGdb"/&gt;
      &lt;ant dir="cytoscape-plugin"/&gt;
    &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Now each module also has a "clean" target, so I add these lines:</p>
  
  <pre><code> &lt;target name="clean"&gt;
      &lt;ant dir="corelib" target="clean"/&gt;
      &lt;ant dir="tools" target="clean"/&gt;
      &lt;ant dir="makeGdb" target="clean"/&gt;
      &lt;ant dir="cytoscape-plugin" target="clean"/&gt;
    &lt;/target&gt;
  </code></pre>
  
  <p>And there are more targets like that. Is there a way to rewrite the build file to avoid this duplication? I've looked for a built-in property that contains the active target, but I couldn't find it.</p>