From 84a526187dabce879d324d9cbdf1e078d4d5d889 Mon Sep 17 00:00:00 2001 From: Jan Materne Date: Wed, 14 Mar 2007 14:13:36 +0000 Subject: [PATCH] Example using inside git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@518153 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/CoreTasks/fail.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/manual/CoreTasks/fail.html b/docs/manual/CoreTasks/fail.html index 8a38ac2bc..0eb17416f 100644 --- a/docs/manual/CoreTasks/fail.html +++ b/docs/manual/CoreTasks/fail.html @@ -29,6 +29,7 @@

Exits the current build (just throwing a BuildException), optionally printing additional information.

The message of the Exception can be set via the message attribute or character data nested into the element.

+

Parameters

@@ -72,6 +73,7 @@ or character data nested into the element.

Examples

+
  <fail/>

will exit the current build with no further information given.

@@ -122,7 +124,19 @@ BUILD FAILED
 build.xml:2: condition satisfied
 
- +
+<fail message="Files are missing.">
+    <condition>
+        <not>
+            <resourcecount count="2">
+                <fileset id="fs" dir="." includes="one.txt,two.txt"/>
+            </resourcecount>
+        </not>
+    </condition>
+</fail>
+
+

Will check that both files one.txt and two.txt are present otherwise the build +will fail.