title: Junit ant task - JUnitTask was not found
body: <p>I'm trying to run Junit test from my ant build.xml file. I read <a href="http://ant.apache.org/manual/Tasks/junit.html" rel="noreferrer">here</a> that you can use a junit.jar file instead of using the .jar that is located in the ant.home/lib directory. This is what I want to do since our Jenkins autobuild set-up has no junit.jar file in his ant lib directory.</p>
  
  <p>Even with the simpliest project, I'm always getting this error that the JUnitTask was not found. If you look at my build.xml file, it is clearly included and used in the junit task. </p>
  
  <p>build.xml :</p>
  
  <pre><code>&lt;project default="all"&gt;
      &lt;property name="TALK" value="false" /&gt;
  
      &lt;path id="classpath.base"&gt;
      &lt;/path&gt;
      &lt;path id="classpath.test"&gt;
          &lt;fileset dir="." includes="**/*.jar" /&gt;
      &lt;/path&gt;
  
      &lt;target name="compile-test"&gt;
          &lt;javac srcdir="src" verbose="${TALK}"&gt;
              &lt;classpath refid="classpath.test" /&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
  
      &lt;target name="test" depends="compile-test"&gt;
          &lt;junit&gt;
              &lt;classpath refid="classpath.test" /&gt;
              &lt;formatter type="brief" usefile="false" /&gt;
              &lt;test name="TestClass" /&gt;
          &lt;/junit&gt;
      &lt;/target&gt;
  
      &lt;target name="all" depends="test" /&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The small example I made to test things out looks like this :</p>
  
  <p><img src="https://i.stack.imgur.com/ZId6A.png" alt="image"></p>
  
  <p>EDIT : Updated based on answer</p>