ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Farnsworth (JIRA)" <>
Subject [jira] Commented: (IVY-1095) ZipTask should support an option to allow the task to define the last modified date for content stored in the zip, jar, or war.
Date Mon, 15 Jun 2009 17:36:07 GMT


Mark Farnsworth commented on IVY-1095:

This patch solves a problem I have with the current ANT zip, jar, and war tasks producing
files with different content each time the build is run.  While some may see this as a feature;
I find the behavior to be annoying because now a MD5 fingerprint for the zip does not reflect
the content and without the patch my build system can not reproduce a build (down to every
last bit).  This means that with the exact same source from SVN two builds that should produce
the same result will actually have different MD5 hash values because without the patch the
build system does not reflect what is defined in the SVN environment.  

I have workarounds but none of them are as clean since it means that my build system can't
use the standard tasks.  As a result I really hope that ANT is willing to include this patch
in the next release.

The way the task is defined the default behavior of ANT is not changed.  The patch simply
allows for an option where the script can define what last modification date the zip file
should use.   In addition to solving my MD5 fingerprint issue this option would also provide
a way for users to control the dates that are applied to content and in doing so solve problems
with app servers that use date stamps in relation to resource caching.   Having the option
puts the script in control if it wants to define how the zip, war, jar, or ear is produced.

> ZipTask should support an option to allow the task to define the last modified date for
content stored in the zip, jar, or war.
> -------------------------------------------------------------------------------------------------------------------------------
>                 Key: IVY-1095
>                 URL:
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Ant
>    Affects Versions: trunk
>            Reporter: Mark Farnsworth
>             Fix For: trunk
>         Attachments:
>   Original Estimate: 1h
>  Remaining Estimate: 1h
> Currently with ANT Tasks it is not possible to fully control the way Zip, Jar, Ear, or
War files are produced.   The issue is that the default behavior of the task includes the
last modified date information from the file system when in creates an archive.  The result
is that with the exact same source code the archive produced from any given build will vary
based on where and when the build was run.  In an environment like HUDSON where you wish to
build on different servers, from different branches, and at different times this is problematic
since the MD5 hash value of the artifact the build produces will not reflect the content of
the code but rather reflect a combination of the content of the code and the current time
of the server where the build was run.
> ANT should support an option for the task to define the last modified date of the archive.
 If support for this option is added to the Zip task then it will be automatically available
in tasks that extend it.
> The patch file attached to this issue provides an implementation of the last modified
attribute and can be applied to SVN revision 784603 of

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message