title: ZipException when running junit tests
body: <p>I've been trying in vain to get ant to execute some tests written in junit. Any advice would be much appreciated. I'm pretty new to both ant and Java so please be patient.</p>
  
  <p>As a quick summary, what i'm doing is trying to get ant to execute a very simple test, the classpath looks ok considering the output from ant -debug. I'm getting a null test error for a test who's class file is explicitly mentioned in the classpath. Also, i'm getting a ZipException, i dont know what that's about.</p>
  
  <p>Here's a testcase i'm trying to run:</p>
  
  <pre><code>package testmanagment;
  import junit.framework.*;
  
  public abstract class EasyTest extends TestCase
  {
  
      public EasyTest(String name)
      {
          super(name);
      }
  
      protected void setUp()
      {}
  
      protected void testSeeMee() throws Exception
      {
          assertTrue(true);
      }
  
      protected void testSeeMeetoo() throws Exception
      {
          assertTrue(true);
      }   
  }
  </code></pre>
  
  <p>There are a few tests in the package, this one was just to see why everything was failing. it fails with ZipException.</p>
  
  <p>and here's a little bit of my make file:</p>
  
  <pre><code>  &lt;property name="src" value="src/"/&gt; 
       &lt;property name="build" value="build/"/&gt;  
       &lt;property name="test" value="${build}test/"/&gt;
       &lt;property name="testreportsdir" value="${test}reports/"/&gt;
       &lt;property name="classdir" value="${build}classes/"/&gt;
       &lt;property name="lib" value="lib/"/&gt; 
  
      &lt;path id="files-classpath"&gt;  
          &lt;fileset dir="lib/" &gt;  
              &lt;include name="*.jar"/&gt;  
          &lt;/fileset&gt;  
      &lt;/path&gt; 
  
      &lt;path id="tests-classpath"&gt;
          &lt;path refid="files-classpath"/&gt;
          &lt;pathelement location="${classdir}/"/&gt;
      &lt;/path&gt;
  
      &lt;path id="tests-runpath"&gt;
          &lt;path refid="tests-classpath"/&gt;
          &lt;fileset dir="${test}/"&gt;
              &lt;include name="*.class"/&gt;
              &lt;include name="**/*.class"/&gt;
              &lt;include name="testmanagment/*.class"/&gt;
              &lt;include name="*.*"/&gt;
              &lt;include name="**/*.*"/&gt;
              &lt;include name="testmanagment/*.*"/&gt;
          &lt;/fileset&gt;
          &lt;/path&gt;
  
  blah blah blah
  
      &lt;target name="test" depends="compile_tests"&gt;
          &lt;junit haltonfailure="true"  printsummary="false"&gt;
              &lt;classpath refid="tests-runpath"/&gt;
              &lt;formatter type="brief" usefile="false"/&gt;
              &lt;test name="testmanagment.EasyTest"/&gt;
              &lt;test name="testmanagment.TestUser"/&gt;
              &lt;test name="testmanagment.TestTest"/&gt;
                  &lt;/junit&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>ant compiles everything fine, and looks to put everything in the right places. but it cant seem to find my tests... here's a little piece of what ant spat out when i ran it with the -debug option. </p>
  
  <pre><code> [junit] Using CLASSPATH /host/Users/Sheena/Desktop/School/Software dev/lab_project/lib/junit-4.8.1.jar:/host/Users/Sheena/Desktop/School/Software dev/lab_project/lib/sqlitejdbc-v056.jar:/host/Users/Sheena/Desktop/School/Software dev/lab_project/build/classes:/host/Users/Sheena/Desktop/School/Software dev/lab_project/build/test/testmanagment/EasyTest.class:/host/Users/Sheena/Desktop/School/Software dev/lab_project/build/test/testmanagment/TestTest.class:/host/Users/Sheena/Desktop/School/Software dev/lab_project/build/test/testmanagment/TestUser.class:/usr/share/ant/lib/junit.jar:/usr/share/java/ant-launcher-1.7.1.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/ant-junit.jar
  Class org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter loaded from parent loader (parentFirst)
  Finding class testmanagment.EasyTest
  Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource testmanagment/EasyTest.class from /host/Users/Sheena/Desktop/School/Software dev/lab_project/build/test/testmanagment/EasyTest.class
  Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource testmanagment/EasyTest.class from /host/Users/Sheena/Desktop/School/Software dev/lab_project/build/test/testmanagment/TestTest.class
  Ignoring Exception java.util.zip.ZipException: error in opening zip file reading resource testmanagment/EasyTest.class from /host/Users/Sheena/Desktop/School/Software dev/lab_project/build/test/testmanagment/TestUser.class
      [junit] Testsuite: testmanagment.EasyTest
      [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
      [junit] 
      [junit] Null Test:  Caused an ERROR
  </code></pre>
  
  <p>sorry about the ugly output there, it's all i have to work with for now.</p>
  
  <p>it looks very much like the testcases are in the classpath, so i dont know what's happening... Maybe it's something to do with the ZipException but i dont know...</p>