From 891ef3586b19bbddafa2cc9e052eb6ba21ca57b5 Mon Sep 17 00:00:00 2001
From: Steve Loughran
- This condition has been added in Apache Ant 1.7. + This condition was added in Apache Ant 1.7.
Evaluate a condition based on a script in any +Apache BSF +supported language.
++See the Script task for +an explanation of scripts and dependencies. +
+ +This condition was added in Apache Ant 1.7.
+ +Attribute | +Description | +Required | +
language | +script language | +Yes | +
value | +default boolean value | +No -default is "false" | +
src | +filename of script source | +No | +
+The script supports script language inline, this script has access to the
+same beans as the <script>
task, and to the
+self
bean, which refers back to the condition itself. The
+value
property of this bean sets the return value:
+
+Example: +
++ <scriptcondition language="javascript" + value="true"> + self.setValue(false); + </scriptcondition> ++ +Sets the default value of the condition to true, then in the script, +sets the value to false. This condition always evaluates to "false"
Copyright © 2001-2004 Apache Software +
Copyright © 2001-2005 Apache Software Foundation. All rights Reserved.