ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claudio Miranda (JIRA)" <>
Subject [jira] Created: (IVY-823) Set the last modified attribute of files downloaded from repositories
Date Thu, 29 May 2008 23:47:46 GMT
Set the last modified attribute of files downloaded from repositories

                 Key: IVY-823
             Project: Ivy
          Issue Type: Improvement
          Components: Core
            Reporter: Claudio Miranda
            Priority: Minor
             Fix For: 2.0-RC1

A small modification, to allow the downloaded resource to have the same date timestamp as
the file in remote repo. 

    At src, File dest, CopyProgressListener


    However this modification is intended to be configurable, see below

Quoting Gilles Scokart from the discussion thread

> I think it should better be a parameter of the retrieve task, or maybe
> an attribute of the resolver in the settings file.
> preservelastmodified sounds a good name (like the ant copy task). 
> Note that if you put it in the resolver settings, that should maybe
> also impact the publish and the install task.
> If you put it in both the settings and the task, then the task should
> have the priority. 

Index: src/java/org/apache/ivy/util/url/
--- src/java/org/apache/ivy/util/url/       (revision 661197)
+++ src/java/org/apache/ivy/util/url/       (working copy)
@@ -131,6 +131,10 @@
                         "Downloaded file size doesn't match expected Content Length for "
+ src
                                 + ". Please retry.");
+            boolean remoteTimestamp = true;
+            if (remoteTimestamp) {
+                dest.setLastModified(srcConn.getLastModified());
+            }
         } finally {

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

View raw message