title: junit and ant issue. Cannot start test
body: <p>When I am running a junit test from ant I always get:</p>
  
  <pre><code>D:\metrike&gt;ant test
  Buildfile: build.xml
  
  init:
  
  compile:
  
  test:
      [junit] Running jmt.test.TestCodeBase
      [junit] Testsuite: jmt.test.TestCodeBase
      [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,046 sec
      [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0,046 sec
      [junit]
      [junit] Testcase: warning(junit.framework.TestSuite$1):     FAILED
      [junit] No tests found in jmt.test.TestCodeBase
      [junit] junit.framework.AssertionFailedError: No tests found in jmt.test.TestCodeBase
      [junit]
      [junit]
      [junit] Test jmt.test.TestCodeBase FAILED
  </code></pre>
  
  <p>This is the ant file:</p>
  
  <pre><code>&lt;target name="test" depends="compile"&gt;
      &lt;mkdir dir="target/test-results"/&gt;
      &lt;junit haltonfailure="no" printsummary="on"&gt;
          &lt;classpath &gt;
              &lt;pathelement location="target/classes"/&gt;
              &lt;pathelement location="Libraries/junit3.8.1/junit.jar"/&gt;
          &lt;/classpath&gt;
          &lt;formatter type="brief" usefile="false"/&gt;
          &lt;formatter type="xml" /&gt;
          &lt;batchtest todir="target/test-results" &gt;
              &lt;fileset dir="target/classes" includes="**/TestCodeBase.class"/&gt;
          &lt;/batchtest&gt;
      &lt;/junit&gt;
  &lt;/target&gt;
  </code></pre>
  
  <p>But when I manually run the test, junit test works:</p>
  
  <pre><code>D:\metrike&gt;cd target
  
  D:\metrike\target&gt;cd classes
  
  D:\metrike\target\classes&gt;java jmt.test.TestCodeBase
  fatsource.jar eclapsed : 2297 ms
  over all : 2297 ms
  contains 3073 classes and 3700 referred classes, 35968 referred methods, 22351 referred fields
  Memory usage: 21326 KB
  Post gc-memory usage: 19506 KB
  contains 3073 classes and 3700 referred classes, 35968 referred methods, 22351 referred fields
  </code></pre>
  
  <p>Can someone please tell me what I am doing wrong? I have been trying to fix this for a whole day but I cannot find the solution.</p>