| java.lang.Object org.apache.tools.ant.Main
Main | public class Main implements AntMain(Code) | | Command line entry point into Ant. This class is entered via the
canonical `public static void main` entry point and reads the
command line arguments. It then assembles and executes an Ant
project.
If you integrating Ant into some other tool, this is not the class
to use as an entry point. Please see the source code of this
class to see how it manipulates the Ant project classes.
|
Constructor Summary | |
public | Main() | protected | Main(String[] args) Sole constructor, which parses and deals with command line
arguments.
Parameters: args - Command line arguments. |
Method Summary | |
protected void | addBuildListeners(Project project) Adds the listeners specified in the command line arguments,
along with the default listener, to the specified project. | protected void | exit(int exitCode) This operation is expected to call
System.exit(int) , which
is what the base version does. | public static synchronized String | getAntVersion() Returns the Ant version information, if available. | public static void | main(String[] args) Command line entry point. | public static void | start(String[] args, Properties additionalUserProperties, ClassLoader coreLoader) Creates a new instance of this class using the
arguments specified, gives it any extra user properties which have been
specified, and then runs the build using the classloader provided.
Parameters: args - Command line arguments. | public void | startAnt(String[] args, Properties additionalUserProperties, ClassLoader coreLoader) |
DEFAULT_BUILD_FILENAME | final public static String DEFAULT_BUILD_FILENAME(Code) | | The default build file name.
|
Main | public Main()(Code) | | Constructor used when creating Main for later arg processing
and startup
|
Main | protected Main(String[] args) throws BuildException(Code) | | Sole constructor, which parses and deals with command line
arguments.
Parameters: args - Command line arguments. Must not be null . exception: BuildException - if the specified build file doesn't existor is a directory. |
addBuildListeners | protected void addBuildListeners(Project project)(Code) | | Adds the listeners specified in the command line arguments,
along with the default listener, to the specified project.
Parameters: project - The project to add listeners to.Must not be null . |
exit | protected void exit(int exitCode)(Code) | | This operation is expected to call
System.exit(int) , which
is what the base version does.
However, it is possible to do something else.
Parameters: exitCode - code to exit with |
getAntVersion | public static synchronized String getAntVersion() throws BuildException(Code) | | Returns the Ant version information, if available. Once the information
has been loaded once, it's cached and returned from the cache on future
calls.
the Ant version information as a String(always non-null ) exception: BuildException - if the version information is unavailable |
main | public static void main(String[] args)(Code) | | Command line entry point. This method kicks off the building
of a project object and executes a build using either a given
target or the default target.
Parameters: args - Command line arguments. Must not be null . |
start | public static void start(String[] args, Properties additionalUserProperties, ClassLoader coreLoader)(Code) | | Creates a new instance of this class using the
arguments specified, gives it any extra user properties which have been
specified, and then runs the build using the classloader provided.
Parameters: args - Command line arguments. Must not be null . Parameters: additionalUserProperties - Any extra properties to use in thisbuild. May be null , which is the equivalent topassing in an empty set of properties. Parameters: coreLoader - Classloader used for core classes. May benull in which case the system classloader is used. |
startAnt | public void startAnt(String[] args, Properties additionalUserProperties, ClassLoader coreLoader)(Code) | | Start Ant
Parameters: args - command line args Parameters: additionalUserProperties - properties to set beyond those thatmay be specified on the args list Parameters: coreLoader - - not used since: Ant 1.6 |
|
|