elharo commented on PR #66: URL: https://github.com/apache/maven-artifact-plugin/pull/66#issuecomment-2429217436
MARTIFACT-75 is a very interesting and uncommon exception pattern. If I'm following the discussion correctly, there is in fact a bug in the maven-dependency-plugin code that causes it to load the wrong file. That leads to this zip exception. So yes, in this one case the stacktrace does help. However that's the zebra case. The horses cases (i.e. when you hear hoof beats think horses, not zebras) is that the file is in fact corrupt. I have seen corrupt jar files in Maven repos, central included, many, many times over the years, though more frequently when I was in the business of deep scanning large dependency trees in groups of many projects. Back when I was doing that, it was pretty routine that somewhere in a scan of thousands of artifacts, you'd hit one or two corrupt jars. Stack traces should be reserved for program bugs, usually indicated by runtime exceptions. In this very specific case, it turns out the ZipException actually is a program bug so a stack trace is helpful, but the vast majority of the time a ZipException or IOException indicates a problem in external data and not in the program itself. IN that far more common case, the stack trace is unactionable noise. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
