Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

<groovy>

Description

Executes a series of Groovy statements. Statements can either be read in from a text file using the src attribute or from between the enclosing Groovy tags.

Required taskdef

Assuming groovy-all-VERSION.jar is in my.classpath you will need to declare this task at some point in the build.xml prior to using this task.

<groovy> attributes

Attribute

Description

Required

src

File containing Groovy statements.
The directory containing the file is added to the classpath (since RC-1)

Yes, unless statements enclosed within tags

classpath

the classpath to use (since RC-1)

No

classpathref

the classpath to use, given as reference to a PATH defined elsewhere (since RC-1)

No

Parameters specified as nested elements

classpath (since RC-1)

Groovy's classpath attribute is a PATH like structure and can also be set via a nested classpath element.

available bindings

A number of bindings are in scope for use within your Groovy statements.

Name

Description

ant

an instance of AntBuilder that knows about the current ant project

project

the current ant project

properties

a Map of ant properties

target

the owning target that invoked this groovy script

task

the wrapping task, can access anything needed in org.apache.tools.ant.Task

Examples

  • No labels