ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Stevens <>
Subject uptodate when it isn't
Date Thu, 02 Jul 2009 17:21:14 GMT

I've got a bit of a puzzle with an uptodate task, and I'm hoping I've
just missed something obvious...

Part of my build script "compiles" various database objects by copying
them with token replacement, to substitute the environment-specific
database name at various points.  I didn't want to do this (nor
execute them against the unit tests' database) if it wasn't necessary,
so I figured the uptodate task was the easiest answer.  However, after
running the script the first time (which did everything as expected) I
edited one of the SQL source files, but the subsequent build skipped
straight through without applying it to the database :-(
After further investigation, I found the culprit seems to be the
uptodate task - it sets the property to "true" even though one of the
source files has a later timestamp (by a few minutes) than its
equivalent target file.  The task I was using is

        <uptodate property="test.database.uptodate"
            <srcfiles dir="${sql.dir}" includes="**/*.sql"/>
            <mapper type="identity"/>

where sql.dir=src/sql and build.test.database.dir=build/test/database.
 The source file in question is in src/sql/datamart_Views/USERS.sql,
and I can see the equivalent file in

I noticed the identity mapper docs said the from and to attributes
were ignored, and also found an open bug
( that looks
to be relevant.  So I tried swapping the mapper to
            <globmapper from="*" to="*"/>
but that behaves the same.  I can even delete some of the files in
build/test/database/datamart_Views, or the datamart_Views directory
itself and it still tells me I'm up to date!  But if I delete the
build/test/database directory it goes back to leaving the property

Am I missing something obvious?  Does uptodate return true if *any*
file in the set is up to date, not when all of them are?  Or is it
something else?

--  Open source java sudoku solver

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

View raw message