Unfortunately that would cause all artifacts to always be copied fresh, even if
nothing has changed. The post-download-artifact trigger is called for all files
even if it's not actually updated.
I guess I wasn't too clear on the distinction in my first email, but what I
really wanted was to have any artifact which is replaced in my library folder
to get the current time/date, regardless of the repository/cache date of the
file.
I'm not actually using Ivy for a Java project, so I'm not up to date on Java
programming, but I guess this could be a time to dig out the old patching
skills.
I imagine a "touch_retrieved_files" option on the retrieve task would sort out
my problems.
My other issue with the retrieve engine relying on dates when copying so that
one cannot revert to an older version ("Retrieve fails to revert to earlier
version") would have to be fixed as well, but I'm not sure if I think that
should be a new option, it sounds more like a bugfix to me.
Cheers,
/axl
-----Original Message-----
From: news [mailto:[email protected]] On Behalf Of Tom Widmer
Sent: den 26 oktober 2009 19:29
To: [email protected]
Subject: Re: Timestamps
Andreas Axelsson wrote:
> How can I get Ivy to always set the current time as the modification time of
> retrieved files so that build tools relying on time stamps work correctly
> without having to clean and rebuild? Currently it preserves the repository
> time stamp.
>
> I currently use the last RC that was out before 2.1.0.
You could possibly use a post-download-artifact trigger (in your
ivysettings.xml):
<triggers>
<ant-call target="touch" event="post-download-artifact"/>
</triggers>
Then in your build script:
<target name="touch">
<touch file="${file}"/>
</target>
Or something like that.
Tom