Ant Package generates bad zip with header b'\x00\x00\x00\x00'

Viewed 25
export ANT_HOME="/data/ant/apache-ant-1.10.12"
export PATH=$ANT_HOME/bin:$PATH
export ANT_OPTS="-Xmx256M -Xms256M"
export JAVA_HOME="/data/java/jdk-11.0.2"
ant -Doutput.path=/s3data/releases/AMANDA/${BuildType}/${verNo}/java8 -Dlaunch4j.dir=/data/launch4j/launch4j_3.14 package

The above is the commands I use to package my maven builds which creates a zip of library files. Which will be dumped in the target tomcat deployment by extracting.

Suddenly I started getting the below error when the jenkins job tried to unzip the zip file in the target slaves.

Traceback (most recent call last):
File "Tomcat_Deploy.py", line 194, in <module>
File "zipfile.py", line 1617, in extract
File "zipfile.py", line 1687, in _extract_member
File "zipfile.py", line 1524, in open
zipfile.BadZipFile: Bad magic number for file header
[13796] Failed to execute script 'Tomcat_Deploy' due to unhandled exception!

I found that the zip created was incorrect and the headers were wrong.

b'\x00\x00\x00\x00'
0 Answers
Related