Index: index.html
===================================================================
RCS file: /home/cvspublic/jakarta-ant/docs/index.html,v
retrieving revision 1.114
diff -u -r1.114 index.html
--- index.html	2000/09/24 08:52:33	1.114
+++ index.html	2000/09/25 08:54:43
@@ -1752,6 +1752,16 @@
     <td valign="top">A message giving further information on why the build exited</td>
     <td align="center" valign="top">No</td>
   </tr>
+  <tr>
+    <td valign="top">if</td>
+    <td valign="top">Only fail if the specified property (without ${}) exists</td>
+    <td align="center" valign="top">No</td>
+  </tr>
+  <tr>
+    <td valign="top">unless</td>
+    <td valign="top">Only fail if the specified property (without ${}) does not exist</td>
+    <td align="center" valign="top">No</td>
+  </tr>
 </table>
 <h3>Examples</h3>
 <pre>  &lt;fail/&gt;</pre>
@@ -1769,6 +1779,18 @@
 BUILD FAILED
 
 build.xml:4: Something wrong here.
+</pre>
+</p>
+
+<pre>
+  &lt;fail message=&quot;You must specify 'required.prop'.&quot;
+        unless=&quot;required.prop&quot;/&gt;</pre>
+<p>will exit the current build and print &quot;You must define 'required.prop'.&quot;
+to whereever your output goes:
+<pre>
+BUILD FAILED
+
+build.xml:10: You must define 'required.prop'.
 </pre>
 </p>
 <hr>
Index: Exit.java
===================================================================
RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Exit.java,v
retrieving revision 1.1
diff -r1.1 Exit.java
66a67,68
>     private String ifCondition = "";
>     private String unlessCondition = "";
70a73,80
> 
>     public void setIf(String condition) { 
>         ifCondition = condition;
>     }
> 
>     public void setUnless(String condition) { 
>         unlessCondition = condition;
>     }
72,76c82,88
<     public void execute() throws BuildException {
<         if (message != null && message.length() > 0) { 
<             throw new BuildException(message);
<         } else {
<             throw new BuildException("No message");
---
>     public void execute() throws BuildException { 
>         if (testIfCondition() && testUnlessCondition()) { 
>             if (message != null && message.length() > 0) { 
>                 throw new BuildException(message);
>             } else {
>                 throw new BuildException("No message");
>             }
77a90,99
>     }
> 
>     private boolean testIfCondition() {
>         return "".equals(ifCondition) 
>             || project.getProperty(ifCondition) != null;
>     }
> 
>     private boolean testUnlessCondition() {
>         return "".equals(unlessCondition) 
>             || project.getProperty(unlessCondition) == null;
