Edit C:\apache-ant-1.8.0\docs\manual\api\org\apache\tools\ant\Main.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_22) on Mon Feb 01 19:35:31 EST 2010 --> <TITLE> Main (Apache Ant API) </TITLE> <META NAME="keywords" CONTENT="org.apache.tools.ant.Main class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Main (Apache Ant API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/apache/tools/ant/MagicNames.html" title="class in org.apache.tools.ant"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/tools/ant/NoBannerLogger.html" title="class in org.apache.tools.ant"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/tools/ant/Main.html" target="_top"><B>FRAMES</B></A> <A HREF="Main.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> org.apache.tools.ant</FONT> <BR> Class Main</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.tools.ant.Main</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/tools/ant/launch/AntMain.html" title="interface in org.apache.tools.ant.launch">AntMain</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>Main</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../../org/apache/tools/ant/launch/AntMain.html" title="interface in org.apache.tools.ant.launch">AntMain</A></DL> </PRE> <P> 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. <p> 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. <P> <P> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#DEFAULT_BUILD_FILENAME">DEFAULT_BUILD_FILENAME</A></B></CODE> <BR> The default build file name.</TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> </CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#Main()">Main</A></B>()</CODE> <BR> Constructor used when creating Main for later arg processing and startup</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected </CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#Main(java.lang.String[])">Main</A></B>(java.lang.String[] args)</CODE> <BR> <B>Deprecated.</B> <I>since 1.6.x</I></TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#addBuildListeners(org.apache.tools.ant.Project)">addBuildListeners</A></B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)</CODE> <BR> Adds the listeners specified in the command line arguments, along with the default listener, to the specified project.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#exit(int)">exit</A></B>(int exitCode)</CODE> <BR> This operation is expected to call <CODE>System.exit(int)</CODE>, which is what the base version does.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#getAntVersion()">getAntVersion</A></B>()</CODE> <BR> Returns the Ant version information, if available.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE> <BR> Command line entry point.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#start(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">start</A></B>(java.lang.String[] args, java.util.Properties additionalUserProperties, java.lang.ClassLoader coreLoader)</CODE> <BR> 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.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../org/apache/tools/ant/Main.html#startAnt(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">startAnt</A></B>(java.lang.String[] args, java.util.Properties additionalUserProperties, java.lang.ClassLoader coreLoader)</CODE> <BR> Start Ant</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="DEFAULT_BUILD_FILENAME"><!-- --></A><H3> DEFAULT_BUILD_FILENAME</H3> <PRE> public static final java.lang.String <B>DEFAULT_BUILD_FILENAME</B></PRE> <DL> <DD>The default build file name. "build.xml" <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME">Constant Field Values</A></DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="Main()"><!-- --></A><H3> Main</H3> <PRE> public <B>Main</B>()</PRE> <DL> <DD>Constructor used when creating Main for later arg processing and startup <P> </DL> <HR> <A NAME="Main(java.lang.String[])"><!-- --></A><H3> Main</H3> <PRE> protected <B>Main</B>(java.lang.String[] args) throws <A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE> <DL> <DD><B>Deprecated.</B> <I>since 1.6.x</I> <P> <DD>Sole constructor, which parses and deals with command line arguments. <P> <DL> <DT><B>Parameters:</B><DD><CODE>args</CODE> - Command line arguments. Must not be <code>null</code>. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if the specified build file doesn't exist or is a directory.</DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="start(java.lang.String[], java.util.Properties, java.lang.ClassLoader)"><!-- --></A><H3> start</H3> <PRE> public static void <B>start</B>(java.lang.String[] args, java.util.Properties additionalUserProperties, java.lang.ClassLoader coreLoader)</PRE> <DL> <DD>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. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>args</CODE> - Command line arguments. Must not be <code>null</code>.<DD><CODE>additionalUserProperties</CODE> - Any extra properties to use in this build. May be <code>null</code>, which is the equivalent to passing in an empty set of properties.<DD><CODE>coreLoader</CODE> - Classloader used for core classes. May be <code>null</code> in which case the system classloader is used.</DL> </DD> </DL> <HR> <A NAME="startAnt(java.lang.String[], java.util.Properties, java.lang.ClassLoader)"><!-- --></A><H3> startAnt</H3> <PRE> public void <B>startAnt</B>(java.lang.String[] args, java.util.Properties additionalUserProperties, java.lang.ClassLoader coreLoader)</PRE> <DL> <DD>Start Ant <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/tools/ant/launch/AntMain.html#startAnt(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">startAnt</A></CODE> in interface <CODE><A HREF="../../../../org/apache/tools/ant/launch/AntMain.html" title="interface in org.apache.tools.ant.launch">AntMain</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>args</CODE> - command line args<DD><CODE>additionalUserProperties</CODE> - properties to set beyond those that may be specified on the args list<DD><CODE>coreLoader</CODE> - - not used<DT><B>Since:</B></DT> <DD>Ant 1.6</DD> </DL> </DD> </DL> <HR> <A NAME="exit(int)"><!-- --></A><H3> exit</H3> <PRE> protected void <B>exit</B>(int exitCode)</PRE> <DL> <DD>This operation is expected to call <CODE>System.exit(int)</CODE>, which is what the base version does. However, it is possible to do something else. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>exitCode</CODE> - code to exit with</DL> </DD> </DL> <HR> <A NAME="main(java.lang.String[])"><!-- --></A><H3> main</H3> <PRE> public static void <B>main</B>(java.lang.String[] args)</PRE> <DL> <DD>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. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>args</CODE> - Command line arguments. Must not be <code>null</code>.</DL> </DD> </DL> <HR> <A NAME="addBuildListeners(org.apache.tools.ant.Project)"><!-- --></A><H3> addBuildListeners</H3> <PRE> protected void <B>addBuildListeners</B>(<A HREF="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</A> project)</PRE> <DL> <DD>Adds the listeners specified in the command line arguments, along with the default listener, to the specified project. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>project</CODE> - The project to add listeners to. Must not be <code>null</code>.</DL> </DD> </DL> <HR> <A NAME="getAntVersion()"><!-- --></A><H3> getAntVersion</H3> <PRE> public static java.lang.String <B>getAntVersion</B>() throws <A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></PRE> <DL> <DD>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. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the Ant version information as a String (always non-<code>null</code>) <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</A></CODE> - if the version information is unavailable</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/apache/tools/ant/MagicNames.html" title="class in org.apache.tools.ant"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/tools/ant/NoBannerLogger.html" title="class in org.apache.tools.ant"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/apache/tools/ant/Main.html" target="_top"><B>FRAMES</B></A> <A HREF="Main.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de