Ant Taskdef Java.util.zip.zipexception Error In Opening Zip File
Contents |
here for a quick ant build error in opening zip file overview of the site Help Center Detailed answers
Java.util.zip.zipexception Error In Opening Zip File Junit Ant
to any questions you might have Meta Discuss the workings and policies
Java.util.zip.zipexception Error In Opening Zip File Eclipse
of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Configuring ant to run unit tests. Where should libraries be? How should classpath be configured? avoiding ZipException up vote 17 down vote favorite 4 I'm trying to run my junit tests using ant. The tests are kicked off using a JUnit 4 test suite. If I run this direct from Eclipse the tests complete without error. However if I run it from ant then many of the tests fail with this error repeated over and over until the junit task crashes. [junit] java.util.zip.ZipException: error in opening zip file [junit] at java.util.zip.ZipFile.open(Native Method) [junit] at java.util.zip.ZipFile.(ZipFile.java:114) [junit] at java.util.zip.ZipFile.(ZipFile.java:131) [junit] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028) [junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147) [junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.nextElement(AntClassLoader.java:130) [junit] at org.apache.tools.ant.util.CollectionUtils$CompoundEnumeration.nextElement(CollectionUtils.java:198) [junit] at sun.misc.CompoundEnumeration.nextElement(CompoundEnumeration.java:43) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.checkForkedPath(JUnitTask.java:1128) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1013) [junit] at org.apa
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 http://stackoverflow.com/questions/461417/configuring-ant-to-run-unit-tests-where-should-libraries-be-how-should-classpa million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ZipException when running junit tests up vote 8 down vote favorite 1 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 http://stackoverflow.com/questions/6015092/zipexception-when-running-junit-tests ant and Java so please be patient. 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. Here's a testcase i'm trying to run: 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); } } There are a few tests in the package, this one was just to see why everything was failing. it fails with ZipException. and here's a little bit of my make file:
tests. I had a problem where the log4J.properties file needed to be in on the test class path. If you add a individually file to the classpath you error in get an exception which looks like this; [junit] java.util.zip.ZipException: error in opening zip file [junit] at java.util.zip.ZipFile.open(Native Method) [junit] at java.util.zip.ZipFile.