title: JUnit run tests inside a JAR
body: <p>I'm using pure JUnit 4 test and I have them compiled inside some jars that belongs to the classpath.
  I'd like to run all the tests in my classpath. </p>
  
  <p>Is there a way?</p>
  
  <p>My tasks looks like:</p>
  
  <pre><code>&lt;target name="test" description="All the tests"&gt;
      &lt;junit fork="yes"&gt;
          &lt;classpath&gt; 
              &lt;path refid="test.classpath" /&gt;
              &lt;fileset dir="war/WEB-INF/lib/"&gt;
                  &lt;include name="*.jar"/&gt;
              &lt;/fileset&gt;
              &lt;fileset dir="war/WEB-INF"/&gt;
              &lt;fileset dir="war"/&gt;
          &lt;/classpath&gt;
      &lt;formatter type="plain" usefile="false" /&gt;
  
      &lt;/junit&gt;
  &lt;/target&gt;
  </code></pre>