Name

script

Synopsis

Executes a Bean Scripting Framework (BSF) script. This task requires IBM’s Bean Scripting Framework, as well as a supported scripting language such as Rhino or Jython. BSF is available at http://oss.software.ibm.com/developerworks/projects/bsf. ReleaseNotes.html, found in the BSF distribution, indicates where supported scripting languages are available.

Attributes

language (all, String, Y)

The script language name.

src (all, String, N)

The location of a script source file, if the script is not inline.

Content

The script task accepts text content containing inline script code. This is the alternative to the src attribute. An XML CDATA section is required when scripts contain illegal XML characters such as '<' or '&', or when linefeeds must be preserved. For example:

<script language="javascript"><![CDATA[
  // some JavaScript code here...
  if (a < b) {
    ...
  }
]]></script>

Get Ant: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.