diff --git a/docs/manual/OptionalTasks/script.html b/docs/manual/OptionalTasks/script.html index f2147d391..3ef8a12ef 100644 --- a/docs/manual/OptionalTasks/script.html +++ b/docs/manual/OptionalTasks/script.html @@ -9,14 +9,14 @@
Execute a script in a +
Execute a script in a Apache BSF supported language.
Note: This task depends on external libraries not included in the Ant distribution. See Library Dependencies for more information.
All items (tasks, targets, etc) of the running project are
accessible from the script, using either their name
or
id
attributes (as long as their names are considered
-valid Java identifiers, that is).
+valid Java identifiers, that is).
The name "project" is a pre-defined reference to the Project, which can be
used instead of the project name. The name "self" is a pre-defined reference to the actual
<script>-Task instance.
From these objects you have access to the Ant Java API, see the
@@ -26,6 +26,15 @@ used instead of the project name. The name "self" is a pre-defined reference to
If you are using JavaScript a good resource is http://www.mozilla.org/rhino/doc.html as we are using their JavaScript interpreter.
Scripts can do almost anything a task written in Java could do.
+Rhino provides a special construct - the JavaAdapter. Whith that you can +create an object which implements several interfaces, extends classes and for which you +can overwrite methods. Because this is an undocumented feature (yet), here is the link +to an explanation: +Groups@Google: "Rhino, enum.js, JavaAdapter?" by Norris Boyd in the newsgroup +netscape.public.mozilla.jseng.
+ + +