You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Jeff Langr <je...@langrsoft.com> on 2004/01/29 20:17:19 UTC
[PATCH] FAQ how-do-I addition
I hope I got the patchfile and faq xml format down correctly.
-Jeff-
-----
Index: faq.xml
===================================================================
RCS file: /home/cvspublic/ant/xdocs/faq.xml,v
retrieving revision 1.46
diff -u -r1.46 faq.xml
--- faq.xml 8 Jan 2004 17:01:27 -0000 1.46
+++ faq.xml 29 Jan 2004 19:05:19 -0000
@@ -361,7 +361,7 @@
</answer>
</faq>
-
+
<faq id="batch-shell-execute">
<question>How do I execute a batch file or shell script from
Ant?</question>
<answer>
@@ -504,6 +504,24 @@
<a href="manual/OptionalTasks/script.html">
<code><script></code> task documentation</a> for more
details.</p>
+ </answer>
+ </faq>
+
+ <faq id="require-property-to-be-set">
+ <question>How do I require a property to be set?</question>
+ <answer>
+ <p>Use the <code>fail</code> task with the <code>unless</code>
attribute.
+ The failure message may be specified in one of two ways.</p>
+
+ <source><![CDATA[
+<target name="checkProperties">
+ <fail unless="server">server property must be set</fail>
+ <fail unless="jarBase" message="jarBase property must be set" />
+</target>
+]]></source>
+
+ <p>You can then depend on this task as part of initialization.</p>
+
</answer>
</faq>