git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268934 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -196,105 +196,6 @@ This will only install the <code>bin</code> and <code>lib</code> directories. | |||||
| <code>install-lite</code> targets will overwrite | <code>install-lite</code> targets will overwrite | ||||
| the current Ant version in <code>ANT_HOME</code>.</p> | the current Ant version in <code>ANT_HOME</code>.</p> | ||||
| <hr> | |||||
| <h2><a name="running">Running Ant</a></h2> | |||||
| <p>Running Ant is simple, when you installed it as described in the previous | |||||
| section. Just type <code>ant</code>.</p> | |||||
| <p>When nothing is specified, Ant looks for a <code>build.xml</code> | |||||
| file in the current directory. If found, it uses that file as the | |||||
| buildfile. If you use the <code>-find</code> option, | |||||
| Ant will search for a buildfile in | |||||
| the parent directory, and so on, until the root of the filesystem | |||||
| has been reached. To make Ant use | |||||
| another buildfile, use the command-line | |||||
| option <code>-buildfile <i>file</i></code>, | |||||
| where <i>file</i> is the buildfile you want to use.</p> | |||||
| <p>You can also set properties that override properties specified in the | |||||
| buildfile (see the <a href="CoreTasks/property.html">property</a> task). | |||||
| This can be done with | |||||
| the <nobr><code>-D<i>property</i>=<i>value</i></code></nobr> option, | |||||
| where <i>property</i> is the name of the property, | |||||
| and <i>value</i> is the value for that property. | |||||
| This can also be used to pass in the value of some environment variables. | |||||
| You can also access environment variables using the <a href="CoreTasks/property.html"> | |||||
| property</a> task. | |||||
| Just pass <nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or | |||||
| <nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix) | |||||
| to Ant - you can then access | |||||
| these variables inside your buildfile as <code>${MYVAR}</code>.</p> | |||||
| <p>Two more options are: <nobr><code>-quiet</code></nobr>, | |||||
| which instructs Ant to print less | |||||
| information on the console when running, and | |||||
| <nobr><code>-verbose</code></nobr>, which causes Ant to print | |||||
| additional information to the console.</p> | |||||
| <p>It is also possible to specify one or more targets that should be executed. | |||||
| When omitted, the target that is specified in the | |||||
| <code>default</code> attribute of the <code><project></code> tag is | |||||
| used.</p> | |||||
| <p>The <nobr><code>-projecthelp</code></nobr> | |||||
| option gives a list of this project's | |||||
| targets. First those with a description, then those without one.</p> | |||||
| <p>Command-line option summary:</p> | |||||
| <pre>ant [options] [target [target2 [target3] ...]] | |||||
| Options: | |||||
| -help print this message | |||||
| -projecthelp print project help information | |||||
| -version print the version information and exit | |||||
| -quiet be extra quiet | |||||
| -verbose be extra verbose | |||||
| -debug print debugging information | |||||
| -emacs produce logging information without adornments | |||||
| -logfile <i>file</i> use given file for log output | |||||
| -logger <i>classname</i> the class that is to perform logging | |||||
| -listener <i>classname</i> add an instance of class as a project listener | |||||
| -buildfile <i>file</i> use specified buildfile | |||||
| -find <i>file</i> search for buildfile towards the root of the filesystem and use the first one found | |||||
| -D<i>property</i>=<i>value</i> set <i>property</i> to <i>value</i> | |||||
| </pre> | |||||
| <h3>Examples</h3> | |||||
| <blockquote> | |||||
| <pre>ant</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>build.xml</code> file in the current directory, on | |||||
| the default target.</p> | |||||
| <blockquote> | |||||
| <pre>ant -buildfile test.xml</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>test.xml</code> file in the current directory, on | |||||
| the default target.</p> | |||||
| <blockquote> | |||||
| <pre>ant -buildfile test.xml dist</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>test.xml</code> file in the current directory, on a | |||||
| target called <code>dist</code>.</p> | |||||
| <blockquote> | |||||
| <pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>test.xml</code> file in the current directory, on a | |||||
| target called <code>dist</code>, setting the <code>build</code> property to the | |||||
| value <code>build/classes</code>.</p> | |||||
| <h3>Running Ant by Hand</h3> | |||||
| <p>If you have installed Ant in the do-it-yourself way, Ant can be started | |||||
| with:</p> | |||||
| <blockquote> | |||||
| <pre>java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre> | |||||
| </blockquote> | |||||
| <p>These instructions actually do exactly the same as the <code>ant</code> | |||||
| command. The options and target are the same as when running Ant with the <code>ant</code> | |||||
| command. This example assumes you have set your classpath to include:</p> | |||||
| <ul> | |||||
| <li><code>ant.jar</code></li> | |||||
| <li>jars/classes for your XML parser</li> | |||||
| <li>the JDK's required jar/zip files</li> | |||||
| </ul> | |||||
| <hr> | <hr> | ||||
| <h2><a name="librarydependencies">Library Dependencies</a></h2> | <h2><a name="librarydependencies">Library Dependencies</a></h2> | ||||
| <p>The following libraries are needed in your CLASSPATH or in the | <p>The following libraries are needed in your CLASSPATH or in the | ||||
| @@ -0,0 +1,115 @@ | |||||
| <html> | |||||
| <head> | |||||
| <meta http-equiv="Content-Language" content="en-us"> | |||||
| <title>Ant User Manual</title> | |||||
| </head> | |||||
| <body> | |||||
| <h1>Running Ant</h1> | |||||
| <p>Running Ant is simple, when you installed it as described in the previous | |||||
| section. Just type <code>ant</code>.</p> | |||||
| <p>When nothing is specified, Ant looks for a <code>build.xml</code> | |||||
| file in the current directory. If found, it uses that file as the | |||||
| buildfile. If you use the <code>-find</code> option, | |||||
| Ant will search for a buildfile in | |||||
| the parent directory, and so on, until the root of the filesystem | |||||
| has been reached. To make Ant use | |||||
| another buildfile, use the command-line | |||||
| option <code>-buildfile <i>file</i></code>, | |||||
| where <i>file</i> is the buildfile you want to use.</p> | |||||
| <p>You can also set properties that override properties specified in the | |||||
| buildfile (see the <a href="CoreTasks/property.html">property</a> task). | |||||
| This can be done with | |||||
| the <nobr><code>-D<i>property</i>=<i>value</i></code></nobr> option, | |||||
| where <i>property</i> is the name of the property, | |||||
| and <i>value</i> is the value for that property. | |||||
| This can also be used to pass in the value of some environment variables. | |||||
| You can also access environment variables using the <a href="CoreTasks/property.html"> | |||||
| property</a> task. | |||||
| Just pass <nobr><code>-DMYVAR=%MYVAR%</code></nobr> (Windows) or | |||||
| <nobr><code>-DMYVAR=$MYVAR</code></nobr> (Unix) | |||||
| to Ant - you can then access | |||||
| these variables inside your buildfile as <code>${MYVAR}</code>.</p> | |||||
| <p>Two more options are: <nobr><code>-quiet</code></nobr>, | |||||
| which instructs Ant to print less | |||||
| information on the console when running, and | |||||
| <nobr><code>-verbose</code></nobr>, which causes Ant to print | |||||
| additional information to the console.</p> | |||||
| <p>It is also possible to specify one or more targets that should be executed. | |||||
| When omitted, the target that is specified in the | |||||
| <code>default</code> attribute of the <code><project></code> tag is | |||||
| used.</p> | |||||
| <p>The <nobr><code>-projecthelp</code></nobr> | |||||
| option gives a list of this project's | |||||
| targets. First those with a description, then those without one.</p> | |||||
| <p>Command-line option summary:</p> | |||||
| <pre>ant [options] [target [target2 [target3] ...]] | |||||
| Options: | |||||
| -help print this message | |||||
| -projecthelp print project help information | |||||
| -version print the version information and exit | |||||
| -quiet be extra quiet | |||||
| -verbose be extra verbose | |||||
| -debug print debugging information | |||||
| -emacs produce logging information without adornments | |||||
| -logfile <i>file</i> use given file for log output | |||||
| -logger <i>classname</i> the class that is to perform logging | |||||
| -listener <i>classname</i> add an instance of class as a project listener | |||||
| -buildfile <i>file</i> use specified buildfile | |||||
| -find <i>file</i> search for buildfile towards the root of the filesystem and use the first one found | |||||
| -D<i>property</i>=<i>value</i> set <i>property</i> to <i>value</i> | |||||
| </pre> | |||||
| <h3>Examples</h3> | |||||
| <blockquote> | |||||
| <pre>ant</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>build.xml</code> file in the current directory, on | |||||
| the default target.</p> | |||||
| <blockquote> | |||||
| <pre>ant -buildfile test.xml</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>test.xml</code> file in the current directory, on | |||||
| the default target.</p> | |||||
| <blockquote> | |||||
| <pre>ant -buildfile test.xml dist</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>test.xml</code> file in the current directory, on a | |||||
| target called <code>dist</code>.</p> | |||||
| <blockquote> | |||||
| <pre>ant -buildfile test.xml -Dbuild=build/classes dist</pre> | |||||
| </blockquote> | |||||
| <p>runs Ant using the <code>test.xml</code> file in the current directory, on a | |||||
| target called <code>dist</code>, setting the <code>build</code> property to the | |||||
| value <code>build/classes</code>.</p> | |||||
| <h3>Running Ant by Hand</h3> | |||||
| <p>If you have installed Ant in the do-it-yourself way, Ant can be started | |||||
| with:</p> | |||||
| <blockquote> | |||||
| <pre>java -Dant.home=c:\ant org.apache.tools.ant.Main [options] [target]</pre> | |||||
| </blockquote> | |||||
| <p>These instructions actually do exactly the same as the <code>ant</code> | |||||
| command. The options and target are the same as when running Ant with the <code>ant</code> | |||||
| command. This example assumes you have set your classpath to include:</p> | |||||
| <ul> | |||||
| <li><code>ant.jar</code></li> | |||||
| <li>jars/classes for your XML parser</li> | |||||
| <li>the JDK's required jar/zip files</li> | |||||
| </ul> | |||||
| <br> | |||||
| <hr> | |||||
| <p align="center">Copyright © 2000,2001 Apache Software Foundation. All rights | |||||
| Reserved.</p> | |||||
| </body> | |||||
| </html> | |||||
| @@ -11,6 +11,7 @@ | |||||
| <h2>Table of Contents</h2> | <h2>Table of Contents</h2> | ||||
| <a href="intro.html">Introduction</a><br> | <a href="intro.html">Introduction</a><br> | ||||
| <a href="install.html">Installing Ant</a><br> | <a href="install.html">Installing Ant</a><br> | ||||
| <a href="running.html">Running Ant</a><br> | |||||
| <a href="using.html">Using Ant</a><br> | <a href="using.html">Using Ant</a><br> | ||||
| <a href="coretasklist.html" target="navFrame">Built-in Tasks</a><br> | <a href="coretasklist.html" target="navFrame">Built-in Tasks</a><br> | ||||
| <a href="optionaltasklist.html" target="navFrame">Optional Tasks</a><br> | <a href="optionaltasklist.html" target="navFrame">Optional Tasks</a><br> | ||||