org.apache.tools.ant.taskdefs
public class SubAnt extends Task
subant can be used with directory sets to execute a build from different directories. 2 different options are offered
Since: Ant1.6
UNKNOWN: name="subant" category="control"
Method Summary | |
---|---|
void | add(ResourceCollection rc)
Adds a resource collection to the implicit build path.
|
void | addConfiguredTarget(Ant.TargetElement t)
Add a target to this Ant invocation. |
void | addDirset(DirSet set)
Adds a directory set to the implicit build path.
|
void | addFilelist(FileList list)
Adds an ordered file list to the implicit build path.
|
void | addFileset(FileSet set)
Adds a file set to the implicit build path.
|
void | addProperty(Property p)
Corresponds to <ant> 's
nested <property> element.
|
void | addPropertyset(PropertySet ps)
Corresponds to <ant> 's
nested <propertyset> element. |
void | addReference(Ant.Reference r)
Corresponds to <ant> 's
nested <reference> element.
|
Path | createBuildpath()
Creates a nested build path, and add it to the implicit build path.
|
Path.PathElement | createBuildpathElement()
Creates a nested <buildpathelement> ,
and add it to the implicit build path.
|
void | execute()
Runs the various sub-builds. |
protected String | getDefaultBuildFile()
Get the default build file name to use when launching the task.
|
void | handleErrorFlush(String output)
Pass output sent to System.err to the new project.
|
void | handleErrorOutput(String output)
Pass output sent to System.err to the new project.
|
void | handleFlush(String output)
Pass output sent to System.out to the new project.
|
int | handleInput(byte[] buffer, int offset, int length)
Process input into the ant task
|
void | handleOutput(String output)
Pass output sent to System.out to the new project.
|
void | setAntfile(String antfile)
This method builds the file name to use in conjunction with directories.
|
void | setBuildpath(Path s)
Set the buildpath to be used to find sub-projects.
|
void | setBuildpathRef(Reference r)
Buildpath to use, by reference.
|
void | setFailonerror(boolean failOnError)
Sets whether to fail with a build exception on error, or go on.
|
void | setGenericAntfile(File afile)
This method builds a file path to use in conjunction with directories.
|
void | setInheritall(boolean b)
Corresponds to <ant> 's
inheritall attribute.
|
void | setInheritrefs(boolean b)
Corresponds to <ant> 's
inheritrefs attribute.
|
void | setOutput(String s)
Corresponds to <ant> 's
output attribute.
|
void | setTarget(String target)
The target to call on the different sub-builds. |
void | setVerbose(boolean on)
Enable/ disable verbose log messages showing when each sub-build path is entered/ exited.
|
Parameters: rc the resource collection to add.
Since: Ant 1.7
Parameters: t the TargetElement
to add.
Since: Ant 1.7
Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!
Parameters: set the directory set to add.
Note that contrary to file and directory sets, file lists can reference non-existent files or directories!
Parameters: list the file list to add.
Note that the directories will be added to the build path in no particular order, so if order is significant, one should use a file list instead!
Parameters: set the file set to add.
<ant>
's
nested <property>
element.
Parameters: p the property to pass on explicitly to the sub-build.
<ant>
's
nested <propertyset>
element.Parameters: ps the propertset
<ant>
's
nested <reference>
element.
Parameters: r the reference to pass on explicitly to the sub-build.
Returns: the newly created nested build path.
<buildpathelement>
,
and add it to the implicit build path.
Returns: the newly created nested build path element.
This function may be overrided by providers of custom ProjectHelper so they can implement easily their sub launcher.
Returns: the name of the default file
Since: Ant 1.8.0
Parameters: output The error output to log. Should not be null
.
Since: Ant 1.6.2
Parameters: output The error output to log. Should not be null
.
Since: Ant 1.6.2
Parameters: output The output to log. Should not be null
.
Since: Ant 1.6.2
Parameters: buffer the buffer into which data is to be read. offset the offset into the buffer at which data is stored. length the amount of data to read
Returns: the number of bytes read
Throws: IOException if the data cannot be read
Since: Ant 1.6.2
See Also: (byte[], int, int)
Parameters: output a line of output
Since: Ant 1.6.2
Defaults to "build.xml".
If genericantfile
is set, this attribute is ignored.
Parameters: antfile the short build file name. Defaults to "build.xml".
Parameters: s an Ant Path object containing the buildpath.
Parameters: r a reference to an Ant Path object containing the buildpath.
Parameters: failOnError the new value for this boolean flag.
Use genericantfile
, in order to run the same build file
with different basedirs.
antfile
is ignored.
Parameters: afile (path of the generic ant file, absolute or relative to project base directory)
<ant>
's
inheritall
attribute.
Parameters: b the new value for this boolean flag.
<ant>
's
inheritrefs
attribute.
Parameters: b the new value for this boolean flag.
<ant>
's
output
attribute.
Parameters: s the filename to write the output to.
Parameters: target the target
Parameters: on true to enable verbose mode, false otherwise (default).