https://issues.apache.org/bugzilla/show_bug.cgi?id=47373

           Summary: Zip.java patch to support setting last modified date
           Product: Ant
           Version: 1.7.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


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.  I had some trouble with the ANT build system and am not
100% sure the patch is correct.  If someone with commit access could look over
the patch and let me know if it works for them I would very much appreciate.

BTW, the ANT build.xml file will not open in Eclipse Ganymede (likely an
unrelated Ganymede bug).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to