org.apache.tools.ant.taskdefs
Class Ant
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.Task
|
+--org.apache.tools.ant.taskdefs.Ant
- public class Ant
- extends Task
Call Ant in a sub-project
Constructor Summary |
Ant()
|
Method Summary |
org.apache.tools.ant.taskdefs.Property |
createProperty()
create a property to pass to the new project as a 'user property' |
void |
execute()
Do the execution. |
protected void |
handleErrorOutput(java.lang.String line)
|
protected void |
handleOutput(java.lang.String line)
|
void |
init()
Called by the project to let the task initialize properly. |
void |
setAntfile(java.lang.String s)
set the build file, it can be either absolute or relative. |
void |
setDir(java.io.File d)
... |
void |
setInheritAll(boolean value)
If true, inherit all properties from parent Project
If false, inherit only userProperties and those defined
inside the ant call itself |
void |
setOutput(java.lang.String s)
|
void |
setTarget(java.lang.String s)
set the target to execute. |
Methods inherited from class org.apache.tools.ant.Task |
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Ant
public Ant()
setInheritAll
public void setInheritAll(boolean value)
- If true, inherit all properties from parent Project
If false, inherit only userProperties and those defined
inside the ant call itself
init
public void init()
- Description copied from class:
Task
- Called by the project to let the task initialize properly.
- Overrides:
init
in class Task
- Following copied from class:
org.apache.tools.ant.Task
- Throws:
BuildException
- if someting goes wrong with the build
handleOutput
protected void handleOutput(java.lang.String line)
- Overrides:
handleOutput
in class Task
handleErrorOutput
protected void handleErrorOutput(java.lang.String line)
- Overrides:
handleErrorOutput
in class Task
execute
public void execute()
throws BuildException
- Do the execution.
- Overrides:
execute
in class Task
- Following copied from class:
org.apache.tools.ant.Task
- Throws:
BuildException
- if someting goes wrong with the build
setDir
public void setDir(java.io.File d)
- ...
setAntfile
public void setAntfile(java.lang.String s)
- set the build file, it can be either absolute or relative.
If it is absolute, dir will be ignored, if it is
relative it will be resolved relative to dir.
setTarget
public void setTarget(java.lang.String s)
- set the target to execute. If none is defined it will
execute the default target of the build file
setOutput
public void setOutput(java.lang.String s)
createProperty
public org.apache.tools.ant.taskdefs.Property createProperty()
- create a property to pass to the new project as a 'user property'
Includes only those classes commonly used by task writers. The Ant 1.4.1 distribution includes complete Javadoc for all classes included in Ant, though in most cases these are not intended as APIs.