ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: uptodate question
Date Fri, 14 May 2004 12:50:43 GMT
Mani G. Iyer wrote:

>You are right.  If the timestamps are equal then it is set to true.  I
>think it should be set to false.  I tried the <outofdate> task from
>Ant-contrib and that behaves the same way too.  Is it a documentation
>defect or a  design defect? 
For <outofdate> this would a documention defect.
outofdate attempts to mimic make's idea of outofdateness.

 > make c
cc     c.c   -o c
 > make c
make: `c' is up to date.
 > touch c c.c
 > make
make: `c' is up to date.


>-----Original Message-----
>From: Andrey Grishin [] 
>Sent: Wednesday, May 12, 2004 11:00 AM
>Subject: uptodate question
>I use <uptodate> tag to compare timestamps of sql files in two
>   <target name="checkUptodate">
>      <property name="src" location="../backup/db"/>
>      <property name="target" location="db"/>
>      <uptodate property="checkUptodate.dbUptodate">
>         <srcfiles dir="${src}" includes="*.sql" />
>         <mapper type="glob" from="*.sql" to="${target}/*.sql"/>
>      </uptodate>
>      <echo message="checkUptodate.dbUptodate result:
>${checkUptodate.dbUptodate}" />
>  </target>
>${checkUptodate.dbUptodate} is true is sql files in target directory are
>more recent OR HAVE THE SAME timestamp as those in source directory. 
>Ant documentation says that: "By default, the value of the property is
>set to true if the timestamp of the target file(s) is more recent than
>the timestamp of the corresponding source file(s)."
>Can I have <uptodate> tag returning "false" is timestamps are equal?
>I use Ant 1.6.1 on Linux RedHat 8.0, J2SDK 1.4.0_01
>Thanks in advance, Andrey Grishin.
>To unsubscribe, e-mail:
>For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message