<control : subant>

Description

Calls a given target for all defined sub-builds. This is an extension of ant for bulk project execution.

Use with directories

subant can be used with directory sets to execute a build from different directories. 2 different options are offered

Parameters

Attribute Description Type Required?
genericantfile This method builds a file path to use in conjunction with directories.

Use genericantfile, in order to run the same build file with different basedirs.

If this attribute is set, antfile is ignored.
File ?
output Corresponds to <ant>'s output attribute. String ?
inheritall Corresponds to <ant>'s inheritall attribute. boolean ?
verbose Enable/ disable verbose log messages showing when each sub-build path is entered/ exited. The default value is "false". boolean ?
inheritrefs Corresponds to <ant>'s inheritrefs attribute. boolean ?
antfile This method builds the file name to use in conjunction with directories.

Defaults to "build.xml". If genericantfile is set, this attribute is ignored.

String ?
buildpathref Buildpath to use, by reference. Reference ?
target The target to call on the different sub-builds. Set to "" to execute the default target. String ?
buildpath Set the buildpath to be used to find sub-projects. Path ?
failonerror Sets whether to fail with a build exception on error, or go on. boolean ?

Parameters accepted as nested elements

<reference>

Helper class that implements the nested <reference> element of <ant> and <antcall>.
Attribute Description Type Required
torefid Set the id that this reference to be stored under in the new project. String ?
refid String ?

<fileset> ...

Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).
Attribute Description Type Required
refid Reference ?
file File ?
dir File ?
defaultexcludes boolean ?
followsymlinks boolean ?
casesensitive boolean ?
excludes String ?
includesfile File ?
excludesfile File ?
includes String ?

<buildpathelement>

Helper class, holds the nested <pathelement> values.
Attribute Description Type Required
path String ?

<dirset> ...

Subclass as hint for supporting tasks that the included directories instead of files should be used.
Attribute Description Type Required
refid Reference ?
file File ?
dir File ?
defaultexcludes boolean ?
followsymlinks boolean ?
casesensitive boolean ?
excludes String ?
includesfile File ?
excludesfile File ?
includes String ?

<buildpath> ...

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 ?

<propertyset> ...

A set of properties.
Attribute Description Type Required
refid Sets the value of the refid attribute. Reference ?
dynamic Set whether to reevaluate the set everytime the set is used. Default is true. boolean ?
negate Set whether to negate results. If "true", all properties not selected by nested elements will be returned. Default is "false". boolean ?

<filelist> ...

FileList represents an explicitly named list of files. FileLists are useful when you want to capture a list of files regardless of whether they currently exist. By contrast, FileSet operates as a filter, only returning the name of a matched file if it currently exists in the file system.
Attribute Description Type Required
dir Set the dir attribute. File ?
refid Makes this instance in effect a reference to another FileList instance.

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

Reference ?
files Set the filenames attribute. String ?

<property> ...

Sets a property by name, or set of properties (from file or resource) in the project.

Properties are immutable: whoever sets a property first freezes it for the rest of the build; they are most definitely not variable.

There are five ways to set properties:

Although combinations of these ways are possible, only one should be used at a time. Problems might occur with the order in which properties are set, for instance.

The value part of the properties being set, might contain references to other properties. These references are resolved at the time these properties are set. This also holds for properties loaded from a property file.

Properties are case sensitive.
Attribute Description Type Required
refid Sets a reference to an Ant datatype declared elsewhere. Only yields reasonable results for references PATH like structures or properties. Reference ?
url The url from which to load properties. URL ?
name The name of the property to set. String ?
classpath The classpath to use when looking up a resource. Path ?
userproperty boolean ?
file Filename of a property file to load. File ?
resource The resource name of a property file to load String ?
environment Prefix to use when retrieving environment variables. Thus if you specify environment="myenv" you will be able to access OS-specific environment variables via property names "myenv.PATH" or "myenv.TERM".

Note that if you supply a property name with a final "." it will not be doubled. ie environment="myenv." will still allow access of environment variables through "myenv.PATH" and "myenv.TERM". This functionality is currently only implemented on select platforms. Feel free to send patches to increase the number of platforms this functionality is supported on ;).
Note also that properties are case sensitive, even if the environment variables on your operating system are not, e.g. it will be ${env.Path} not ${env.PATH} on Windows 2000.

String ?
prefix Prefix to apply to properties loaded using file or resource. A "." is appended to the prefix if not specified. String ?
classpathref the classpath to use when looking up a resource, given as reference to a <path> defined elsewhere Reference ?
value The value of the property. String ?