peterreilly 2003/11/24 09:20:19
Modified: docs/manual/CoreTasks uptodate.html
Log:
Clarify the to attribute of the mapper nested element of uptodate
PR: 24249
Obtained from: [EMAIL PROTECTED]
Revision Changes Path
1.12 +26 -2 ant/docs/manual/CoreTasks/uptodate.html
Index: uptodate.html
===================================================================
RCS file: /home/cvs/ant/docs/manual/CoreTasks/uptodate.html,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- uptodate.html 1 Jun 2002 12:26:33 -0000 1.11
+++ uptodate.html 24 Nov 2003 17:20:19 -0000 1.12
@@ -70,7 +70,10 @@
<p>The nested <code><mapper></code> 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.</p>
-
+ <p>
+ The mapper "to" attribute is relative to the target file, or to
+ the "dir" attribute of the nested srcfiles element.
+ </p>
<h3>Examples</h3>
<pre> <uptodate property="xmlBuild.notRequired"
targetfile="${deploy}\xmlClasses.jar" >
<srcfiles dir= "${src}/xml"
includes="**/*.dtd"/>
@@ -111,9 +114,30 @@
if <code>/usr/local/bin/testit</code> is newer than
<code>${build}/.flagfile</code>.</p>
</p>
+ <p>
+ The following shows usage of a relative mapper.
+ </p>
+ <pre>
+ <uptodate property="checkUptodate.uptodate">
+ <srcfiles dir="src" includes="*" />
+ <mapper type="merge" to="../dest/output.done"/>
+ </uptodate>
+ <echo message="checkUptodate result: ${checkUptodate.uptodate}" />
+ </pre>
+ <p>
+ The previous example can be a bit confusing, so it may be better to
+ use absolute paths:
+ </p>
+ <pre>
+ <property name="dest.dir" location="dest"/>
+ <uptodate property="checkUptodate.uptodate">
+ <srcfiles dir="src" includes="*" />
+ <mapper type="merge" to="${dest.dir}/output.done"/>
+ </uptodate>
+ </pre>
<hr>
-<p align="center">Copyright © 2000-2002 Apache Software Foundation.
+<p align="center">Copyright © 2000-2003 Apache Software Foundation.
All rights Reserved.</p>
</body>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]