<internal : Taskdef>

Description

Adds a task definition to the current project, such that this new task can be used in the current project. Two attributes are needed, the name that identifies this task uniquely, and the full name of the class (including the packages) that implements this task.

You can also define a group of tasks at once using the file or resource attributes. These attributes point to files in the format of Java property files. Each line defines a single task in the format:

 taskname=fully.qualified.java.classname
 

Parameters

Attribute Description Type Required?
name String ?
uri String ?
classpath Path ?
file File ?
classname String ?
resource String ?
adaptto String ?
onerror String ["fail", "report", "ignore"] ?
loaderref Reference ?
classpathref Reference ?
adapter String ?
format String ["properties", "xml"] ?
reverseloader boolean ?

Parameters accepted as nested elements

<classpath> ...

This object represents a path as used by CLASSPATH or PATH environment variable.

<sometask>
  <somepath>
    <pathelement location="/path/to/file.jar" />
    <pathelement path="/path/to/file2.jar:/path/to/class2;/path/to/class3" />
    <pathelement location="/path/to/file3.jar" />
    <pathelement location="/path/to/file4.jar" />
  </somepath>
</sometask>

The object implemention sometask must provide a method called createSomepath which returns an instance of Path. Nested path definitions are handled by the Path object and must be labeled pathelement.

The path element takes a parameter path which will be parsed and split into single elements. It will usually be used to define a path from an environment variable.

Attribute Description Type Required
refid Makes this instance in effect a reference to another Path instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Reference ?
path Parses a path definition and creates single PathElements. String ?