Save This Page
Home » apache-ant-1.8.1 » org.apache.tools » ant » [javadoc | source]
org.apache.tools.ant
public class: Main [javadoc | source]
java.lang.Object
   org.apache.tools.ant.Main

All Implemented Interfaces:
    AntMain

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.
Field Summary
public static final  String DEFAULT_BUILD_FILENAME    The default build file name. {@value} 
Constructor:
 public Main() 
 protected Main(String[] args) throws BuildException 
    Sole constructor, which parses and deals with command line arguments.
    Parameters:
    args - Command line arguments. Must not be null.
    Throws:
    BuildException - if the specified build file doesn't exist or is a directory.
    exception: BuildException - if the specified build file doesn't exist or is a directory.
Method from org.apache.tools.ant.Main Summary:
addBuildListeners,   exit,   getAntVersion,   main,   start,   startAnt
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.tools.ant.Main Detail:
 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. However, it is possible to do something else.
 public static synchronized String getAntVersion() throws BuildException 
    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.
 public static  void main(String[] args) 
    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.
 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.
 public  void startAnt(String[] args,
    Properties additionalUserProperties,
    ClassLoader coreLoader) 
    Start Ant