Scriptdef can be used to define an Apache Ant task using a
scripting language. Ant scripting languages supported by Apache
BSF or JSR 223 may be used to define the script. Scriptdef
provides a mechanism to encapsulate control logic from a build
within an Ant task minimizing the need for providing control
style tasks in Ant itself. Complex logic can be made available
while retaining the simple structure of an Ant build file.
Scriptdef is also useful for prototyping new custom tasks.
Certainly as the complexity of the script increases it would be
better to migrate the task definition into a Java based custom
task.  Note: This task depends on external libraries not
included in the Ant distribution. See Library Dependencies for
more information.  The attributes and nested elements supported
by the task may be defined using <attribute> and <element>
nested elements. These are available to the script that
implements the task as two collection style script variables
attributes and elements. The elements in the attri