You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Claudio Miranda <cl...@claudius.com.br> on 2008/05/28 17:44:46 UTC

How to download files from ivyrepo with the same last-modified date ?

At the current customer I am working on, they use javawebstart (JWS) and the
libraries are versioned at CVS. As you are thinking, ivy is the best
candidate to manage those dependencies :)

However there is an obstacle, that I will explain. The JWS uses the
last-modified timestamp of each .jar file to download and update the library
on JWS library repository at $HOME/.java/deployment/cache/javaws/ of each
client.

AFAIK mvn update the last-modified timestamp of each downloaded file to the
current download date, consequently ivy does the same (for maven repo). That
situation, will make the JWS client see different date timestamp between
cached copies and remote copies (eg: commons-codec.jar 1.3 has date of
2006-08-23).

Supposing, you have understand the issue, I gently ask if there is a way to
use the ivyrepo, to maintain the last-modified timestamp for each downloaded
file.

A note: I cannot use (for now) JNLP versioning support [1], as it introduces
another change into the build infrastructure. I plan to use it later, when
ivy is supposed to be running flawlessly.

1 -
http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html#example2

Thanks


-----
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: http://www.nabble.com/How-to-download-files-from-ivyrepo-with-the-same-last-modified-date---tp17515745p17515745.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: How to download files from ivyrepo with the same last-modified date ?

Posted by Claudio Miranda <cl...@claudius.com.br>.

At
https://svn.apache.org/repos/asf/ant/ivy/core/tags/2.0.0-beta2/src/java/org/apache/ivy/util/url/BasicURLHandler.java

method: download

    I see that it is possible to set the downloaded file with the original
timestamp with

dest.setLastModified(srcConn.getLastModified());

    I will open an issue and attach a patch.

Thanks

Claudio Miranda


Claudio Miranda wrote:
> 
>     Ivy downloads it and changes its timestamp to the current download
> date.
> 
>     Is it possible to ivy to retain the original date ?
> 


-----
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: http://www.nabble.com/How-to-download-files-from-ivyrepo-with-the-same-last-modified-date---tp17515745p17521094.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: How to download files from ivyrepo with the same last-modified date ?

Posted by Claudio Miranda <cl...@claudius.com.br>.

    There is a library I am going to use as an example.

<dependency org="skaringa" name="skaringa" rev="r1p8"/>

    Ivy downloads it from
http://repo1.maven.org/maven2/skaringa/skaringa/r1p8/skaringa-r1p8.jar

the library info: http://mvnrepository.com/artifact/skaringa/skaringa/r1p8

The library timestamp is 01-Aug-2005, as stated on the remote repo

    If I download it with wget the timestamp date is  01-Aug-2005

wget -U Mozilla 
http://repo1.maven.org/maven2/skaringa/skaringa/r1p8/skaringa-r1p8.jar

    Ivy downloads it and changes its timestamp to the current download date.

    Is it possible to ivy to retain the original date ?

Thanks

Claudio Miranda





Claudio Miranda wrote:
> 
> At the current customer I am working on, they use javawebstart (JWS) and
> the libraries are versioned at CVS. As you are thinking, ivy is the best
> candidate to manage those dependencies :)
> 
> However there is an obstacle, that I will explain. The JWS uses the
> last-modified timestamp of each .jar file to download and update the
> library on JWS library repository at $HOME/.java/deployment/cache/javaws/
> of each client.
> 
> AFAIK mvn update the last-modified timestamp of each downloaded file to
> the current download date, consequently ivy does the same (for maven
> repo). That situation, will make the JWS client see different date
> timestamp between cached copies and remote copies (eg: commons-codec.jar
> 1.3 has date of 2006-08-23).
> 
> Supposing, you have understand the issue, I gently ask if there is a way
> to use the ivyrepo, to maintain the last-modified timestamp for each
> downloaded file.
> 
> A note: I cannot use (for now) JNLP versioning support [1], as it
> introduces another change into the build infrastructure. I plan to use it
> later, when ivy is supposed to be running flawlessly.
> 
> 1 -
> http://java.sun.com/j2se/1.5.0/docs/guide/javaws/developersguide/downloadservletguide.html#example2
> 
> Thanks
> 
> 


-----
Claudio Miranda
http://weblogs.java.net/blog/claudio
http://www.claudius.com.br/blog
-- 
View this message in context: http://www.nabble.com/How-to-download-files-from-ivyrepo-with-the-same-last-modified-date---tp17515745p17517918.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: How to download files from ivyrepo with the same last-modified date ?

Posted by Jim White <ji...@pagesmiths.com>.
Claudio Miranda wrote:

> At the current customer I am working on, they use javawebstart (JWS) and the
> libraries are versioned at CVS. As you are thinking, ivy is the best
> candidate to manage those dependencies :)

Indeed I think that as well.  I even made a tool called AntAnywhere that 
packages Ant scripts into JNLP, and of course the dandiest way to handle 
dependencies is with Ivy.

http://www.ifcx.org/wiki/AntAnywhere.html

The GUI was never quite finished, but I plan to return to it eventually, 
or perhaps someone else may find it useful and finish it...

> ...
> Supposing, you have understand the issue, I gently ask if there is a way to
> use the ivyrepo, to maintain the last-modified timestamp for each downloaded
> file.

What I'm doing in Wings is using the timestamp as the rev.  I think that 
is the correct approach because rev is exactly the field used to 
distinguish revisions and if timestamps are your revision value then 
that is what you need to put there.

Of course if I've misunsterood what you're trying to do, then 
nevermind... ;-)

Jim