Corrupted Jar On Local Maven Repository
test:test: [junit] Running foo.bar.BlahTestCase java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:111) at java.util.zip.ZipFile.<init>(ZipFile.java:127) at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:870) at org.apache.tools.ant.AntClassLoader.getResource(AntClassLoader.java:799)
After staring blankly on why the test failed with Maven but it was ok as a stand-alone, I remembered that I had this problem before. It was caused by corrupted jar on my local maven repository. The solution was to simply destroy the repository and rebuild it.
Hello, your comment on this saved me some pain. It worked for me as well. But what on earth is going on? Do you understand how this could be? Are there weaknesses in the remote->local repository download that corrupts the artifacts? Still, the “corrupt” artifacts looks perfectly fine in WinZip for instance