Fuego.Util : AntScript

The AntScript component is used to execute Apache Ant scripts.

You can specify one or more targets to execute the script. If no target is specified, the script executes with the default target (as defined by the script).

After execution, the output of the script is available in the AntScript.output attribute.

Example: Executing an Ant Script for the Deploy Target, with a Set of Custom Properties

// Load script
antScript as AntScript
antScript = AntScript("/scripts/build.xml")

// Define custom properties
antProperties as Any[Any]
antProperties[ "env" ] = "production"

// Execute script for "deploy" target
execute AntScript using target = "deploy",
                 properties = antProperties

// Log script's execution output
logMessage "Ant script output:"+ antScript.output