I found the culprit, so reporting the issue just to save others time.
It seems that the problem lays in org.codehaus.plexus.archiver.zip.ZipOutputStream.closeEntry(ZipOutputStream.java:352)
as reported in my exception stack trace. Looking at the sources of org.codehaus...ZipOutputStream.closeEntry
I can see:
entry.setSize( def.getTotalIn() );
and that def
is java.util.zip.Deflater
. However, Deflater.getTotalIn
returns int
not long
. Instead the code should use Deflater.getBytesRead()
which I'm gonna report to the developers.
[EDIT] It's been a while but I see people reading this, so FYI the problem has been fixed since version 2.5
of the maven assembly plugin.