You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by "Mark Farnsworth (JIRA)" <ji...@apache.org> on 2009/06/15 19:28:07 UTC

[jira] Created: (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.

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: https://issues.apache.org/jira/browse/IVY-1095
             Project: Ivy
          Issue Type: Improvement
          Components: Ant
    Affects Versions: trunk
            Reporter: Mark Farnsworth
             Fix For: trunk


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 Zip.java.



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


[jira] Updated: (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.

Posted by "Maarten Coene (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maarten Coene updated IVY-1095:
-------------------------------

    Fix Version/s: 2.2.0-RC1
                       (was: trunk)

> 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: https://issues.apache.org/jira/browse/IVY-1095
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Ant
>    Affects Versions: trunk
>            Reporter: Mark Farnsworth
>             Fix For: 2.2.0-RC1
>
>         Attachments: Zip.java.patch
>
>   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 Zip.java.

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


[jira] Closed: (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.

Posted by "Mark Farnsworth (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Farnsworth closed IVY-1095.
--------------------------------

    Resolution: Duplicate

I moved this issue to the dina-sore bug tracking system.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47373

> 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: https://issues.apache.org/jira/browse/IVY-1095
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Ant
>    Affects Versions: trunk
>            Reporter: Mark Farnsworth
>             Fix For: trunk
>
>         Attachments: Zip.java.patch
>
>   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 Zip.java.

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


[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.

Posted by "Mark Farnsworth (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719662#action_12719662 ] 

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: https://issues.apache.org/jira/browse/IVY-1095
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Ant
>    Affects Versions: trunk
>            Reporter: Mark Farnsworth
>             Fix For: trunk
>
>         Attachments: Zip.java.patch
>
>   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 Zip.java.

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


[jira] Updated: (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.

Posted by "Mark Farnsworth (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-1095?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Farnsworth updated IVY-1095:
---------------------------------

    Attachment: Zip.java.patch

Open source code to patch Zip.java for setting the lastmodified time of content in an archive.

> 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: https://issues.apache.org/jira/browse/IVY-1095
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Ant
>    Affects Versions: trunk
>            Reporter: Mark Farnsworth
>             Fix For: trunk
>
>         Attachments: Zip.java.patch
>
>   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 Zip.java.

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