ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8069] New: - If the "update" option is set on the JAR task, the target jar will be updated even if an update is not required
Date Sun, 14 Apr 2002 16:46:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8069>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8069

If the "update" option is set on the JAR task,  the target jar will be updated even if an
update is not required

           Summary: If the "update" option is set on the JAR task,  the
                    target jar will be updated even if an update is not
                    required
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: jrobke@us.ibm.com


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.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message