ZipException throw by JarFile lacks file name. We wrap it to help debugging. Patch on top of: URL: https://svn.apache.org/repos/asf/maven/shared/tags/maven-shared-jar-1.0 Revision: 732716 Index: src/main/java/org/apache/maven/shared/jar/JarAnalyzer.java =================================================================== --- src/main/java/org/apache/maven/shared/jar/JarAnalyzer.java (revision 732716) +++ src/main/java/org/apache/maven/shared/jar/JarAnalyzer.java (working copy) @@ -32,6 +32,7 @@ import java.util.jar.Manifest; import java.util.regex.Matcher; import java.util.regex.Pattern; +import java.util.zip.ZipException; /** * Open a JAR file to be analyzed. Note that once created, the {@link #closeQuietly()} method should be called to @@ -99,7 +100,16 @@ public JarAnalyzer( File file ) throws IOException { - this.jarFile = new JarFile( file ); + try + { + this.jarFile = new JarFile( file ); + } + catch (ZipException e) + { + ZipException ioe = new ZipException( "Failed to open file " + file ); + ioe.initCause( e ); + throw ioe; + } // Obtain entries list. List entries = Collections.list( jarFile.entries() );