ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew G. Tereschenko" <...@ibis.odessa.ua>
Subject Jar/Zip task does't vefiry file-set/files changes
Date Tue, 09 Jan 2001 16:44:48 GMT
Hi All,

In current version of Ant Jar/Zip task does't verify ZIP content
with files need to be included in it. It verify only files creation
date with zip creation date.

Sample:
1. User has edited build file and added/delete files to be included in zip.
Ant does't see this addition an it's needed to remove zip file
manualy to recreate it with needed content.
(This IS a big issue on big developer team on huge projects.
Any changes in build file lead to full rebuild - but )

2. Zip file was damaged or altered. Ant does't see this changes.
(for example 0-sized file treated as valid result).
Full rebuild needed(if such exist).

* Suggestion for a future Ant version to list ZIPs/Jars and verify
ZIP files date/time/size with files in task description.

P.S> If this feature will be decided for future version and
will be supported i can provide fix...

The code need to be changed is a
jakarta-ant\src\main\org\apache\tools\ant\taskdefs\Zip.java:267
            // Probably unnecessary but just for clarity:
            if (!zipFile.exists()) return false;
            for (int i=0; i<files.length; i++) {
                if (files[i].lastModified() > zipFile.lastModified()) {
                    return false;
                }
            }
            return true;


=============================
Andrew G. Tereschenko
Software Engineer
Integrated Banking Information Systems
tag@ibis.odessa.ua



Mime
View raw message