ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolaus Schmitt" <n.schm...@scaet.de>
Subject Re: how to specify dependencies on additional files
Date Wed, 06 Jun 2001 06:30:18 GMT
> Moreover, this doesn't quite work.  The style task still does its own
dependency determination on the in and style files, and if the out file is
more recent it does not do anything.  Is there a way to force a task to run?
I guess I could delete the out file, or touch the in file, in order to
convince the style task it needs to get to work.  ("Respect my
authorah-tay!" - Eric Cartman :o)

Right! If the "out" file is more recent than any of it's "sources", no build
will be done.
Politely: It seems that stuck in a brain loop.
In a productive environment, any change to one of the sources will be more
recent than the "out" file.
In a build development environment, the "builder" often touches the "out"
file making it more recent than any of the sources.
Proposal: Create some kind of "resetEnv" task.
1. touch "out" and set its timestamp 24h before "now"
2. touch at least one of the "sources" and set its time stamp between "now"
and "now - 24h".
3. make the task conditional: if i am developing/testing the build file, do
"resetEnv"

> Here's my build.xml, simplified.  Thanks in advance for any suggestions,
or sample build.xml's doing similar things.
...
>         <srcfiles dir="."
includes="product_home_parts_list.xml,*.xsl,${data_file}"/>
...
The "includes" expression might lead you into further trouble:
Does it really express "if any of the XSL files in the CWD is newer"?
I would assume, that you'd prefer to list each single source expressively to
avoid confusion if one of the source XSL files is missing?!

regards
Niko


Mime
View raw message