From dc464794fe8bd7881e2fca1b34c28f41a9d57594 Mon Sep 17 00:00:00 2001
From: Peter Reilly The nested
+ The mapper "to" attribute is relative to the target file, or to
+ the "dir" attribute of the nested srcfiles element.
+ <srcfiles> elements, but not both.
<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.Examples
<uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar" >
<srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
@@ -111,9 +114,30 @@ against a single target file:
/usr/local/bin/testit is newer than
${build}/.flagfile.
+ + The following shows usage of a relative mapper. +
+
+ <uptodate property="checkUptodate.uptodate">
+ <srcfiles dir="src" includes="*" />
+ <mapper type="merge" to="../dest/output.done"/>
+ </uptodate>
+ <echo message="checkUptodate result: ${checkUptodate.uptodate}" />
+
+ + The previous example can be a bit confusing, so it may be better to + use absolute paths: +
+
+ <property name="dest.dir" location="dest"/>
+ <uptodate property="checkUptodate.uptodate">
+ <srcfiles dir="src" includes="*" />
+ <mapper type="merge" to="${dest.dir}/output.done"/>
+ </uptodate>
+
Copyright © 2000-2002 Apache Software Foundation. +
Copyright © 2000-2003 Apache Software Foundation. All rights Reserved.