You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Andrew G. Tereschenko" <ta...@ibis.odessa.ua> on 2001/01/09 17:44:48 UTC
Jar/Zip task does't vefiry file-set/files changes
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
Re: Jar/Zip task does't vefiry file-set/files changes
Posted by Stefan Bodewig <bo...@apache.org>.
Andrew G. Tereschenko <ta...@ibis.odessa.ua> wrote:
> 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.
This is true (and has always been) - in most cases this is
sufficient.
Feel free to submit code that will compare file timestamps with those
of the ZIP entries - but please make it optional, i.e. enable it on
user demand with a default of not looking into the ZIP file as it may
have some serious impact on performance.
Stefan