ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Ant Jar Issue
Date Wed, 14 Oct 2015 04:07:28 GMT
On 2015-10-13, Jackie Xiao wrote:

> ​Dear list

>>> The issue:
> When jar-ing a module which contains binary certificate file (auth.p12) on CentOS, with
Ant 1.9.2, it seems the p12 file was corrupted after jar compression. (When reading the cerf
file with InputStream, below exception was thrown)

> Exception message:

>>> The subtle thing:
> BUT, if we open the result jar with 7zip on Windows, drag out the p12 file, then drag
into the jar again, the certificate file can be read without problem by InputStream.

>>> The guess:
> So, 7zip can compress the file correctly, which made me guess it's the jar task which
caused the problem.

At the same time 7zip has been able to extract the certificate so the
archive itself has been readable for 7zip.  This indicates the archive
was correct but you've run into an issue with the code that is
extracting the jar.

> So I use "jar xvf jarfile" to unjar, then "tar xvf myfile.jar *" to "tar a jar file",
and it worked....

I'm not sure I understand which jar you've expanded.  The one created by
Ant or the one created by 7zip.

If it has been the original archive, this also means the jar tool has
been able to read the archive.  This would hint the problem is within
the code you use to read the archive.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message