So, yesterday I had an interesting issue with a corrupt .war file which was producing all sorts of errors when I tried to extract it, for instance:
BUILD FAILED
java.lang.RuntimeException: data starting at 0 is in unknown format
When I manually extracted the war file, or did an inspection on it (using “unzip -T”), then it gave these errors:
error: invalid compressed data to inflate
It turns out I was corrupting it by running a filter on it at an earlier stage in the build, a bit like this:
<copy todir=”${release.dir}/${app.name}/tomcat/” includeEmptyDirs=”false”>
<fileset dir=”${build.dir}/${app.name}/tomcat/”>
</fileset>
<filterset>
<filter token=”SERVERNAME” value=”${dest}” />
<filter token=”DBSERVER” value=”${db.server}” />
</filterset>
</copy>
So basically I had to make sure that the war file was copied separately, and then the other files (which i wanted to run the filter on) were copied afterwards. Interesting…
May i just claim what a support to find a person who really is aware what theyre talking about over the internet. You certainly understand how to handle a problem to moderate and make that important. More people need to read this and perceive this element of the storyline. My spouse and i cant imagine they are not more stylish because you positively have the surprise.