title: How to use parallel task in Ant
body: <p>Hello im working on application which is runing tests one by one trough Ant call. In .bat file build.xml is called in which is called another file with name of .class test which are called is there any chance to make this parallel in Ant?</p>
  
  <p>My ant config look like this:</p>
  
  <pre><code>&lt;target name="testexec-run-pattern" description="=&gt; run JUnit tests by Pattern"&gt;
      &lt;mkdir dir="${junit.dir}/xml" /&gt;
      &lt;input addproperty="input.pattern" /&gt;
      &lt;echo message="Executing pattern: ${input.pattern}" /&gt;
      &lt;junit showoutput="true" printsummary="on"&gt;
          &lt;classpath refid="classpath" /&gt;
          &lt;batchtest todir="${junit.dir}/xml"&gt;
              &lt;formatter type="xml" extension=".xml" usefile="true" /&gt;
              &lt;zipfileset src="${test.jar}"&gt;
                  &lt;patternset includes="${input.pattern}" /&gt;
              &lt;/zipfileset&gt;
          &lt;/batchtest&gt;
      &lt;/junit&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>where patternset includes are test to run. And i want these test to run parallel. I think i will need something like foreach for all tests to be run in thread.</p>