Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import java.util.jar.JarFile;
import java.util.jar.Manifest;
import java.util.zip.ZipEntry;
import java.util.zip.ZipException;

import org.apache.commons.io.IOUtils;
import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -213,8 +214,10 @@ private ReproducibleEnv extractEnv(File file, Artifact artifact) {
} else {
log.warn("no MANIFEST.MF found in jar " + file);
}
} catch (ZipException e) {
log.warn("Corrupt jar file " + file + "\n" + e.getMessage());
} catch (IOException e) {
log.warn("unable to open jar file " + file, e);
log.warn("unable to read jar file " + file + "\n" + e.getMessage());
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thinking again at it: if we do that, we need to display the exception class
like if the exception message was the first line of the stacktrace, as it brings useful info = the type of issue

with that pattern, ok, the rest of the stacktrace can be ignored

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added exception class name

}
return null;
}
Expand Down