[ 
https://issues.apache.org/jira/browse/MNG-7425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17649101#comment-17649101
 ] 

Nils Breunese commented on MNG-7425:
------------------------------------

[~michael-o] I'm afraid I can't use that at work, since we use Maven Wrapper 
for all of our builds, this custom Maven build won't be available from our 
artifact repository and our CI servers won't let allow access to just any URL 
on the internet. I also can't really reproduce this issue at will and this 
issue occurs only a couple of times per year for me personally, so it will be 
hard for me to verify if Resolver 1.8 fixes this issue in a reasonable 
timeframe anyway.

> Maven artifact downloads sometimes result in empty zip files in local 
> repository
> --------------------------------------------------------------------------------
>
>                 Key: MNG-7425
>                 URL: https://issues.apache.org/jira/browse/MNG-7425
>             Project: Maven
>          Issue Type: Bug
>          Components: Artifacts and Repositories
>    Affects Versions: 3.8.4
>            Reporter: Nils Breunese
>            Priority: Major
>             Fix For: 3.9.0-candidate
>
>
> I’ve been encountering Maven warnings like these for years from time to time:
> {code}
> WARN: zip file is empty: 
> /Users/username/.m2/repository/com/example/example-artifact/1.2.3/example-artifact-1.2.3.jar
> java.util.zip.ZipException: zip file is empty
> {code}
> This issue causes builds to fail. While I am sure that Maven 3.8.4 is 
> affected, this is certainly not the oldest version that is affected.
> According to [the thread I started about this on the Maven users mailinglist 
> this issue|https://lists.apache.org/thread/5kq5xkwdm2583dhfor78vf0l5mc11l9x] 
> occurs on at least macOS, Linux and Windows.
> I know that when I encounter this I can just delete the file and run Maven 
> again and then it’ll generally download ok, but this a manual workaround for 
> an issue that shouldn't exist in the first place.
> * Could Maven be modified to ensure that 0 bytes artifacts don't end up in 
> the local repository?
> * Would it make sense for Maven to assume that an empty JAR file was not 
> downloaded correctly and the download should be retried automatically?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to