comments 2

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.

About these ads

2 Comments

  1. Tor

    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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s