Clover Knowledge Base : Error reading Clover 4.0.3 JAR file

Symptoms

Running a build with Clover-for-Ant 4.0.3 or 4.0.4 fails with an error like this:

Error reading project file jar:file:/c:/clover-ant-4.0.3/lib/clover.jar!/cloverlib.xml: central directory
 zip64 extended information extra field's length doesn't match central directory data.  Expected length 0 but is 16

This error does not happen for Clover-for-Ant versions prior to 4.0.3.

Cause

This is a bug in Ant related with ZIP64 implementation. It occurs in Ant 1.9.0 and 1.9.1.

Resolution

Use Ant 1.9.2 or later. Alternatively, use Ant 1.7.x or 1.8.x.