From dc464794fe8bd7881e2fca1b34c28f41a9d57594 Mon Sep 17 00:00:00 2001 From: Peter Reilly Date: Mon, 24 Nov 2003 17:20:19 +0000 Subject: [PATCH] Clarify the to attribute of the mapper nested element of uptodate PR: 24249 Obtained from: nakato@qute.co.jp git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275675 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/uptodate.html | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/docs/manual/CoreTasks/uptodate.html b/docs/manual/CoreTasks/uptodate.html index 70bb68d66..8b36b29d3 100644 --- a/docs/manual/CoreTasks/uptodate.html +++ b/docs/manual/CoreTasks/uptodate.html @@ -70,7 +70,10 @@ attribute or nested <srcfiles> elements, but not both.

The nested <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.

- +

+ The mapper "to" attribute is relative to the target file, or to + the "dir" attribute of the nested srcfiles element. +

Examples

  <uptodate property="xmlBuild.notRequired" targetfile="${deploy}\xmlClasses.jar" >
     <srcfiles dir= "${src}/xml" includes="**/*.dtd"/>
@@ -111,9 +114,30 @@ against a single target file:

if /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.