Gant 1.9.6

org.codehaus.gant.ant
[Java] Class Gant

java.lang.Object
  org.apache.tools.ant.ProjectComponent
      org.apache.tools.ant.Task
          org.codehaus.gant.ant.Gant

public class Gant
extends org.apache.tools.ant.Task

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.

Authors:
Russel Winder


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.

 
Method Summary
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
org.apache.tools.ant.Task#log(java.lang.String), org.apache.tools.ant.Task#log(java.lang.String, int), org.apache.tools.ant.Task#log(java.lang.Throwable, int), org.apache.tools.ant.Task#log(java.lang.String, java.lang.Throwable, int), org.apache.tools.ant.Task#init(), org.apache.tools.ant.Task#execute(), org.apache.tools.ant.Task#getOwningTarget(), org.apache.tools.ant.Task#getTaskName(), org.apache.tools.ant.Task#getTaskType(), org.apache.tools.ant.Task#setTaskType(java.lang.String), org.apache.tools.ant.Task#setTaskName(java.lang.String), org.apache.tools.ant.Task#setOwningTarget(org.apache.tools.ant.Target), org.apache.tools.ant.Task#getRuntimeConfigurableWrapper(), org.apache.tools.ant.Task#setRuntimeConfigurableWrapper(org.apache.tools.ant.RuntimeConfigurable), org.apache.tools.ant.Task#maybeConfigure(), org.apache.tools.ant.Task#reconfigure(), org.apache.tools.ant.Task#perform(), org.apache.tools.ant.Task#bindToOwner(org.apache.tools.ant.Task), org.apache.tools.ant.Task#clone(), org.apache.tools.ant.Task#getLocation(), org.apache.tools.ant.Task#getDescription(), org.apache.tools.ant.Task#setLocation(org.apache.tools.ant.Location), org.apache.tools.ant.Task#setDescription(java.lang.String), org.apache.tools.ant.Task#getProject(), org.apache.tools.ant.Task#setProject(org.apache.tools.ant.Project), org.apache.tools.ant.Task#wait(long), org.apache.tools.ant.Task#wait(long, int), org.apache.tools.ant.Task#wait(), org.apache.tools.ant.Task#equals(java.lang.Object), org.apache.tools.ant.Task#toString(), org.apache.tools.ant.Task#hashCode(), org.apache.tools.ant.Task#getClass(), org.apache.tools.ant.Task#notify(), org.apache.tools.ant.Task#notifyAll()
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.ProjectComponent#clone(), org.apache.tools.ant.ProjectComponent#log(java.lang.String), org.apache.tools.ant.ProjectComponent#log(java.lang.String, int), org.apache.tools.ant.ProjectComponent#getLocation(), org.apache.tools.ant.ProjectComponent#getDescription(), org.apache.tools.ant.ProjectComponent#setLocation(org.apache.tools.ant.Location), org.apache.tools.ant.ProjectComponent#setDescription(java.lang.String), org.apache.tools.ant.ProjectComponent#getProject(), org.apache.tools.ant.ProjectComponent#setProject(org.apache.tools.ant.Project), org.apache.tools.ant.ProjectComponent#wait(long), org.apache.tools.ant.ProjectComponent#wait(long, int), org.apache.tools.ant.ProjectComponent#wait(), org.apache.tools.ant.ProjectComponent#equals(java.lang.Object), org.apache.tools.ant.ProjectComponent#toString(), org.apache.tools.ant.ProjectComponent#hashCode(), org.apache.tools.ant.ProjectComponent#getClass(), org.apache.tools.ant.ProjectComponent#notify(), org.apache.tools.ant.ProjectComponent#notifyAll()
 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

createDefinition

public Gant.Definition createDefinition()
Create a node to represent a nested definition tag.
Returns:
a new Definition instance ready for values to be added.


createGantTarget

public Gant.GantTarget createGantTarget()
Create a node to represent a nested gantTarget tag.
Returns:
a new GantTarget instance ready for values to be added.


execute

@Override
public void execute()
Load the file and then execute it.


setFile

public void setFile(java.lang.String f)
Set the name of the build file to use. This path is relative to the basedir of the Ant project if it is set, or the directory in which the job was started if the basedir is not set.
Parameters:
f - The name of the file to be used to drive the build.


setInheritAll

public void setInheritAll(boolean value)
If true, pass all properties to the new Ant project.
Parameters:
value - if true pass all properties to the new Ant project.


setTarget

public void setTarget(java.lang.String t)
Set the target to be achieved.
Parameters:
t - The target to achieve.


 

Copyright © 2006–9 The Codehaus. All Rights Reserved.