|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.codehaus.gant.ant.Gant
public class Gant
Execute a Gant script.
This Ant task provides a Gant calling capability. The original intention behind this was to support continuous integration systems that do not directly support Gant but only Ant. However it also allows for gradual evolution of an Ant build into a Gant build.
Possible attributes are:
Both of these are optional. The file 'build.gant' and the default target are used by default. An error results if there is no default target and no target is specified.
Definitions, if needed, are specified using nested definition
tags, one for each symbol
to be defined. Each definition
tag takes a compulsory name
attribute and an
optional value
attribute.
Nested Class Summary | |
---|---|
static class |
Gant.Definition
A class representing a nested definition tag. |
static class |
Gant.GantTarget
A class representing a nested target tag. |
Field Summary | |
---|---|
private java.util.List<Gant.Definition> |
definitions
A list of definitions to be set in the Gant instance. |
private java.lang.String |
file
The path to the file to use to drive the Gant build. |
private boolean |
inheritAll
Flag determining whether properties are inherited from the parent project. |
private java.util.List<Gant.GantTarget> |
targets
A list of targets to be achieved by the Gant instance. |
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
Gant()
|
Method Summary | |
---|---|
private void |
addAlmostAll(org.apache.tools.ant.Project newProject,
org.apache.tools.ant.Project oldProject)
Copy all properties from the given project to the new project -- omitting those that have already been set in the new project as well as properties named basedir or ant.file. |
Gant.Definition |
createDefinition()
Create a node to represent a nested definition tag. |
Gant.GantTarget |
createGantTarget()
Create a node to represent a nested gantTarget tag. |
void |
execute()
Load the file and then execute it. |
void |
setFile(java.lang.String f)
Set the name of the build file to use. |
void |
setInheritAll(boolean value)
If true, pass all properties to the new Ant project. |
void |
setTarget(java.lang.String t)
Set the target to be achieved. |
Methods inherited from class org.apache.tools.ant.Task |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.String file
private boolean inheritAll
private final java.util.List<Gant.Definition> definitions
private final java.util.List<Gant.GantTarget> targets
Constructor Detail |
---|
public Gant()
Method Detail |
---|
public void setFile(java.lang.String f)
f
- The name of the file to be used to drive the build.public void setTarget(java.lang.String t)
t
- The target to achieve.public Gant.GantTarget createGantTarget()
gantTarget
tag.
GantTarget
instance ready for values to be added.public Gant.Definition createDefinition()
definition
tag.
Definition
instance ready for values to be added.public void setInheritAll(boolean value)
value
- if true pass all properties to the new Ant project.public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
private void addAlmostAll(org.apache.tools.ant.Project newProject, org.apache.tools.ant.Project oldProject)
org.apache.tools.ant.taskdefs.Ant
source.
newProject
- the Project
to copy into.oldProject
- the Project
to copy properties from.
|
Copyright © 2006–9 The Codehaus. All Rights Reserved. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |