mx:Groovy

Attributes

AttributeDescriptionRequired
srcFile containing Groovy statements. The directory containing the file is added to the classpathYes, unless statements enclosed within tags
classpaththe classpath to useNo
classpathrefthe classpath to use, given as reference to a PATH defined elsewhereNo

Nested Elements

Bindings

NameDescription
antan instance of AntBuilder that knows about the current ANT project
projectthe current ANT project
pomthe current Moxie project object model
propertiesa Map of ANT properties
targetthe owning target that invoked this groovy script
taskthe wrapping task
argscommand line arguments, if any

Example

<mx:groovy>
    println "Hello World from ANT->mx:Groovy->System.out"
    ant.echo "Hello World from ANT->mx:Groovy->ANT.echo"
    println()
    println "Coordinates: $pom.coordinates"
    println "Developers: $pom.developers"
    println "Licenses: $pom.licenses"	
</mx:groovy>