From 05a7fe852f774ed56eba0631c453e1688913dd51 Mon Sep 17 00:00:00 2001
From: Diane Holt Sets a property if a target files are more up to date than a set of
-Source files. Source files are specified by nested <srcfiles>
-elements, these are FileSets, while target
-files are specified using a nested mapper
-element. The value part of the property being set is true if the
-timestamp of the target files is more recent than the timestamp of
-every corresponding source file. The default behavior is to use a merge
-mapper with the Normally, this task is used to set properties that are useful to avoid target
-execution depending on the relative age of the specified files. Sets a property if a target file or set of target files is more up-to-date
+than a source file or set of source files. A single source file is specified
+using the By default, the value of the property is set to If a Normally, this task is used to set properties that are useful to avoid
+target execution depending on the relative age of the specified files. The nested Note: You can specify either the The nested Note: The nested sets the property This can be written as sets the property This can be written as: as well.Uptodate
Description
-to
attribute set to the value of the
-targetfile attribute.srcfile
attribute. A set of source files is specified
+using the nested <srcfiles>
+elements. These are FileSets,
+whereas multiple target files are specified using a nested
+<mapper>
element.true
if
+the timestamp of the target file(s) is more recent than the timestamp of
+the corresponding source file(s). You can set the value to something other
+than the default by specifying the value
attribute.<srcfiles>
element is used, without also specifying
+a <mapper>
element, the default behavior is to use a
+merge mapper, with the
+to
attribute set to the value of the
+targetfile
attribute.Parameters
+
+
@@ -31,36 +36,71 @@ execution depending on the relative age of the specified files.
property
- the name of the property to set.
+ The name of the property to set.
Yes
+ value
- the value to set the property to. Defaults to "true".
- No
+ The value to set the property to.
+ No; defaults to
+ true
.
+
srcfile
+ The file to check against the target file.
+ Yes, unless a nested
+
<srcfiles>
element is present.
targetfile
- the file for which we want to determine the status.
- Yes, unless a nested mapper element is
- present.
+ The file for which we want to determine the status.
+ Yes, unless a nested
+
<mapper>
element is present.Parameters specified as nested elements
+srcfiles
+<srcfiles>
element allows you to specify a
+set of files to check against the target file(s).srcfile
+attribute or nested <srcfiles>
elements, but not both.
+
+mapper
+<mapper>
element allows you to specify
+a set of target files to check for being up-to-date with respect to a
+set of source files.<mapper>
element is
+only valid when used with the <srcfiles>
element.
+
Examples
<uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar" >
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
</uptodate>
-xmlBuild.notRequired
to the value "true"
-if the ${deploy}/xmlClasses.jar is more up to date than any of the DTD files in the ${src}/xml directory. <uptodate property="xmlBuild.notRequired" >
+
xmlBuild.notRequired
to true
+if the ${deploy}/xmlClasses.jar
file is more up-to-date than
+any of the DTD files in the ${src}/xml
directory. <uptodate property="xmlBuild.notRequired">
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
<mapper type="merge" to="${deploy}\xmlClasses.jar"/>
</uptodate>
-
<uptodate property="isUpToDate" + srcfile="/usr/local/bin/testit" + targetfile="${build}/.flagfile"/> ++
sets the property isUpToDate
to true
+if /usr/local/bin/testit
is newer than
+${build}/.flagfile
.
Copyright © 2001 Apache Software Foundation. All rights -Reserved.
+Copyright © 2001,2002 Apache Software Foundation. +All rights Reserved.