????

Your IP : 216.73.216.152


Current Path : /opt/ant/manual/api/org/apache/tools/ant/
Upload File :
Current File : //opt/ant/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 lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_03) on Tue May 22 06:24:50 CEST 2012 -->
<title>Main (Apache Ant API)</title>
<meta name="date" content="2012-05-22">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Main (Apache Ant API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/tools/ant/MagicNames.html" title="class in org.apache.tools.ant"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/ant/NoBannerLogger.html" title="class in org.apache.tools.ant"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/ant/Main.html" target="_top">Frames</a></li>
<li><a href="Main.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.tools.ant</div>
<h2 title="Class Main" class="title">Class Main</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.tools.ant.Main</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../org/apache/tools/ant/launch/AntMain.html" title="interface in org.apache.tools.ant.launch">AntMain</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong">Main</span>
extends java.lang.Object
implements <a href="../../../../org/apache/tools/ant/launch/AntMain.html" title="interface in org.apache.tools.ant.launch">AntMain</a></pre>
<div class="block">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.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#DEFAULT_BUILD_FILENAME">DEFAULT_BUILD_FILENAME</a></strong></code>
<div class="block">The default build file name.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier</th>
<th class="colLast" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>&nbsp;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#Main()">Main</a></strong>()</code>
<div class="block">Constructor used when creating Main for later arg processing
 and startup</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected </code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#Main(java.lang.String[])">Main</a></strong>(java.lang.String[]&nbsp;args)</code>
<div class="block"><strong>Deprecated.</strong>&nbsp;
<div class="block"><i>since 1.6.x</i></div>
</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#addBuildListeners(org.apache.tools.ant.Project)">addBuildListeners</a></strong>(<a href="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;project)</code>
<div class="block">Adds the listeners specified in the command line arguments,
 along with the default listener, to the specified project.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#exit(int)">exit</a></strong>(int&nbsp;exitCode)</code>
<div class="block">This operation is expected to call <code>System.exit(int)</code>, which
 is what the base version does.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#getAntVersion()">getAntVersion</a></strong>()</code>
<div class="block">Returns the Ant version information, if available.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#main(java.lang.String[])">main</a></strong>(java.lang.String[]&nbsp;args)</code>
<div class="block">Command line entry point.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#start(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">start</a></strong>(java.lang.String[]&nbsp;args,
     java.util.Properties&nbsp;additionalUserProperties,
     java.lang.ClassLoader&nbsp;coreLoader)</code>
<div class="block">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.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/tools/ant/Main.html#startAnt(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">startAnt</a></strong>(java.lang.String[]&nbsp;args,
        java.util.Properties&nbsp;additionalUserProperties,
        java.lang.ClassLoader&nbsp;coreLoader)</code>
<div class="block">Start Ant</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_BUILD_FILENAME">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DEFAULT_BUILD_FILENAME</h4>
<pre>public static final&nbsp;java.lang.String DEFAULT_BUILD_FILENAME</pre>
<div class="block">The default build file name. "build.xml"</div>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../constant-values.html#org.apache.tools.ant.Main.DEFAULT_BUILD_FILENAME">Constant Field Values</a></dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a name="Main()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Main</h4>
<pre>public&nbsp;Main()</pre>
<div class="block">Constructor used when creating Main for later arg processing
 and startup</div>
</li>
</ul>
<a name="Main(java.lang.String[])">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Main</h4>
<pre>protected&nbsp;Main(java.lang.String[]&nbsp;args)
        throws <a href="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></pre>
<div class="block"><span class="strong">Deprecated.</span>&nbsp;<i>since 1.6.x</i></div>
<div class="block">Sole constructor, which parses and deals with command line
 arguments.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>args</code> - Command line arguments. Must not be <code>null</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<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.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="start(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>start</h4>
<pre>public static&nbsp;void&nbsp;start(java.lang.String[]&nbsp;args,
         java.util.Properties&nbsp;additionalUserProperties,
         java.lang.ClassLoader&nbsp;coreLoader)</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>args</code> - Command line arguments. Must not be <code>null</code>.</dd><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><dd><code>coreLoader</code> - Classloader used for core classes. May be
        <code>null</code> in which case the system classloader is used.</dd></dl>
</li>
</ul>
<a name="startAnt(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startAnt</h4>
<pre>public&nbsp;void&nbsp;startAnt(java.lang.String[]&nbsp;args,
            java.util.Properties&nbsp;additionalUserProperties,
            java.lang.ClassLoader&nbsp;coreLoader)</pre>
<div class="block">Start Ant</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../org/apache/tools/ant/launch/AntMain.html#startAnt(java.lang.String[], java.util.Properties, java.lang.ClassLoader)">startAnt</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../org/apache/tools/ant/launch/AntMain.html" title="interface in org.apache.tools.ant.launch">AntMain</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>args</code> - command line args</dd><dd><code>additionalUserProperties</code> - properties to set beyond those that
        may be specified on the args list</dd><dd><code>coreLoader</code> - - not used</dd><dt><span class="strong">Since:</span></dt>
  <dd>Ant 1.6</dd></dl>
</li>
</ul>
<a name="exit(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>exit</h4>
<pre>protected&nbsp;void&nbsp;exit(int&nbsp;exitCode)</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>exitCode</code> - code to exit with</dd></dl>
</li>
</ul>
<a name="main(java.lang.String[])">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>main</h4>
<pre>public static&nbsp;void&nbsp;main(java.lang.String[]&nbsp;args)</pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>args</code> - Command line arguments. Must not be <code>null</code>.</dd></dl>
</li>
</ul>
<a name="addBuildListeners(org.apache.tools.ant.Project)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addBuildListeners</h4>
<pre>protected&nbsp;void&nbsp;addBuildListeners(<a href="../../../../org/apache/tools/ant/Project.html" title="class in org.apache.tools.ant">Project</a>&nbsp;project)</pre>
<div class="block">Adds the listeners specified in the command line arguments,
 along with the default listener, to the specified project.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>project</code> - The project to add listeners to.
                Must not be <code>null</code>.</dd></dl>
</li>
</ul>
<a name="getAntVersion()">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getAntVersion</h4>
<pre>public static&nbsp;java.lang.String&nbsp;getAntVersion()
                                      throws <a href="../../../../org/apache/tools/ant/BuildException.html" title="class in org.apache.tools.ant">BuildException</a></pre>
<div class="block">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.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>the Ant version information as a String
         (always non-<code>null</code>)</dd>
<dt><span class="strong">Throws:</span></dt>
<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</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/tools/ant/MagicNames.html" title="class in org.apache.tools.ant"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/tools/ant/NoBannerLogger.html" title="class in org.apache.tools.ant"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/tools/ant/Main.html" target="_top">Frames</a></li>
<li><a href="Main.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field_summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field_detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>