If the "update" option is set on the JAR task, the target jar will be updated even if an update is not required (ie the src files passed to the jar task are at the same level as the files in the target jar). I have done an initial investigation of this problem below are my findings: -When the update option is set the Zip task renames the zipFile to a tmp file before the call to isUpToDate(...) is made. The isUpToDate method is passed the original zipFile name. The original file no longer exists because the file was renamed. Therefore when Jar.isUpToDate trys to find the ZipFile it no longer exists and the following exception is thrown: java.util.zip.ZipExceptionThe system cannot find the file specified. The exception flags the Jar task to update the jar. -This bug can be fixed by moving the isUpToDate call above the zipFile rename in the ZIP task.
*** Bug 9163 has been marked as a duplicate of this bug. ***
*** Bug 9713 has been marked as a duplicate of this bug. ***
Fixed in the 1.5 branch as can be verified with the build from <http://cvs.apache.org/~bodewig/gump/ant1.5beta/20020627/> or any later version of Ant 1.5.