ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Amerige <>
Subject Re: <copy/> does not "preservelastmodified" on directories.
Date Tue, 18 Oct 2011 11:26:28 GMT
Hi Stefan,

Thanks for the super-rapid reply.  I'll try a couple of approaches and report back what seems
to do the best job.  It might just be 
that using <exec> (in a switch statement catering for all desired operating systems)
is the only way to get exact timestamps, ACLs, etc.

Again thanks!
Steve Amerige
SAS Institute, Deployment Software Development

On 10/18/2011 7:17 AM, Stefan Bodewig wrote:
> On 2011-10-18, Steve Amerige wrote:
>> I'm wondering if the<zip>  task might get you what you're looking for.
>> Although, I'm baffled over the the statement that "Zip archives store
>> file modification times with a granularity of two seconds."  You're
>> kidding, right?  :-)
> Not at all, that's the format definition.
> Some implementations use extra field data to store timestamps at a
> different granularity (or other time stamps like creation time or last
> access time) but they are ignored in most cases.
>> The<tar>  task doesn't mention the 2-second granularity problem, but
>> even with<tarfileset>,
> TAR uses a one second granularity (seconds since midnight Jan 1st 1970,
> "the epoch"), the same is true for CPIO or AR if you wanted to use the
> Compress Antlib.
> tar is likely faster than zip as well as it won't compress the files.
>> the documentation seems to imply that it damages the modes (see the
>> filemode and dirmode attributes).
> Ant can not read the current file permissions (not possible without
> native code pre-Java7) and thus cannot tell zip/tar what to store.
> The same limitation applies to copy itself, Ant's copy task doesn't
> preserve permissions either.
> Stefan
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message