holtdl 02/03/31 23:23:13
Modified: docs/manual/CoreTasks uptodate.html
Log:
Flesh out the example to show the prop's use in an "unless". (PR 5775)
Revision Changes Path
1.8 +17 -0 jakarta-ant/docs/manual/CoreTasks/uptodate.html
Index: uptodate.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/uptodate.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- uptodate.html 31 Mar 2002 21:21:37 -0000 1.7
+++ uptodate.html 1 Apr 2002 07:23:13 -0000 1.8
@@ -87,8 +87,25 @@
<mapper type="merge"
to="${deploy}\xmlClasses.jar"/>
</uptodate></pre>
as well.
+
+The <code>xmlBuild.notRequired</code> property can then be used in a
+<code><target></code> tag's <code>unless</code> attribute to
+conditionally run that target. For example, running the following target:</p>
+<pre>
+<target name="xmlBuild" depends="chkXmlBuild"
unless="xmlBuild.notRequired">
+ ...
+</target>
+</pre>
+will first run the <code>chkXmlBuild</code> target, which contains
+the <code><uptodate></code> task that determines whether
+<code>xmlBuild.notRequired</code> gets set. The property named in
+the <code>unless</code> attribute is then checked for being set/not set.
+If it did get set (ie., the jar file is up-to-date),
+then the <code>xmlBuild</code> target won't be run.
</p>
+<p> The following example shows a single source file being checked
+against a single target file:</p>
<pre> <uptodate property="isUpToDate"
srcfile="/usr/local/bin/testit"
targetfile="${build}/.flagfile"/>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>