ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Stevens <>
Subject Re: uptodate when it isn't
Date Fri, 03 Jul 2009 09:48:31 GMT
2009/7/2 Dominique Devienne <>:
> On Thu, Jul 2, 2009 at 12:21 PM, Andy
> Stevens<> wrote:
>> I've got a bit of a puzzle with an uptodate task, and I'm hoping I've
>> just missed something obvious...
> To cut to the chase, do yourself a favor and use Ant-Contrib's <outofdate>.
> If you want to keep using <uptodate>, run in verbose mode (-v) and you
> should see what uptodate is up to (pun intended :) --DD

Tried that; the relevant line says

datamart_Views\USER_INFO.sql omitted as
C:\MyProject\sql\datamart_Views\USER_INFO.sql is up to date.

Well, seeing as that's the source file, it can hardly not be up to
date!  But I was expecting it to be comparing against

I'm wondering if the problem is that the srcfiles are being resolved
to their full absolute paths before being passed in to the mapper;
such that the identity mapper (or even globbing "*" to "*") returns
the same fully qualified paths.  If so, the statement in the
documentation that "The mapper to attribute is relative to the target
file" is irrelevant because it'll still be the same file wherever it's
being taken "relative" to.
Altenatively, maybe it's just the docs being ambiguous - the complete
version of that statement is
"The mapper to attribute is relative to the target file, or to the dir
attribute of the nested srcfiles element."; so which is it, target or
dir?  Plus, assuming the mapper returns the expected relative path
(datamart_Views\USER_INFO.sql), if the srcfiles' dir location in used
in preference to the task's target, that would always give just the
source files again, which surely is not what you'd intuitively expect.
 Oh well, at least issue #15596 now has another vote ;-)

I've found a workaround that does the trick; in my "compile" target II
follow the copy task with
        <concat destfile="${build.test.database.dir}/tstamp.txt"
            <fileset dir="${sql.dir}" includes="**/*.sql"/>
and use
        <uptodate property="test.database.uptodate"
            <srcfiles dir="${sql.dir}" includes="**/*.sql"/>
for the check instead.  It's a bit of a hack, though.
It seems to me that the merge mapper is the only one that's really
been considered/tested with the uptodate task, at least it's the only
one the task's documentation discusses...

--  Open source java sudoku application

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

View raw message