clean-up tweaks here&there. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270139 13f79535-47bb-0310-9956-ffa450edef68master
@@ -0,0 +1,21 @@ | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Language" content="en-us"> | |||
<title>Apache Ant User Manual</title> | |||
<base target="mainFrame"> | |||
</head> | |||
<body> | |||
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2> | |||
<h3>Developing with Ant</h3> | |||
<a href="develop.html#writingowntask">Writing Your Own Task</a><br> | |||
<a href="develop.html#buildevents">Build Events</a><br> | |||
<a href="develop.html#integration">Source-code Integration</a><br> | |||
</body> | |||
</html> | |||
@@ -5,7 +5,7 @@ | |||
<title>Apache Ant User Manual</title> | |||
</head> | |||
<frameset cols="20%,80%"> | |||
<frameset cols="25%,75%"> | |||
<frame src="toc.html" name="navFrame"> | |||
<frame src="credits.html" name="mainFrame"> | |||
</frameset> | |||
@@ -0,0 +1,22 @@ | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Language" content="en-us"> | |||
<title>Apache Ant User Manual</title> | |||
<base target="mainFrame"> | |||
</head> | |||
<body> | |||
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2> | |||
<h3>Installing Ant</h3> | |||
<a href="install.html#getting">Getting Ant</a><br> | |||
<a href="install.html#sysrequirements">System Requirements</a><br> | |||
<a href="install.html#installing">Installing Ant</a><br> | |||
<a href="install.html#buildingant">Building Ant</a><br> | |||
<a href="install.html#librarydependencies">Library Dependencies</a><br> | |||
</body> | |||
</html> | |||
@@ -8,50 +8,58 @@ | |||
<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 | |||
<h2><a name="commandline">Command Line</a></h2> | |||
<p> If you've installed Ant as described in the | |||
<a href="install.html"> Installing Ant</a> section, | |||
running Ant from the command-line is simple: just type | |||
<code>ant</code>.</p> | |||
<p>When no arguments are specified, Ant looks for a <code>build.xml</code> | |||
file in the current directory and, if found, uses that file as the | |||
buildfile and runs the "default" target. | |||
If you use the <code>-find</code> option, | |||
Ant will search for a buildfile first in the current directory, then in | |||
the parent directory, and so on, until either a buildfile is found or the root | |||
of the filesystem has been reached. To make Ant use | |||
a buildfile other than <code>build.xml</code>, use the command-line | |||
option <code>-buildfile <i>file</i></code>, | |||
where <i>file</i> is the buildfile you want to use.</p> | |||
where <i>file</i> is the name of the buildfile you want to use.</p> | |||
<p>You can also set properties that override properties specified in the | |||
<p>You can also set <a href="using.html#properties">properties</a> 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. | |||
This can also be used to pass in the value of environment variables. | |||
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> | |||
these variables inside your buildfile as <code>${MYVAR}</code>. | |||
You can also access environment variables using the <a href="CoreTasks/property.html"> | |||
property</a> task. | |||
</p> | |||
<p>Two more options are: <nobr><code>-quiet</code></nobr>, | |||
<p>Options that affect the amount of logging output by Ant are: <nobr><code>-quiet</code></nobr>, | |||
which instructs Ant to print less | |||
information on the console when running, and | |||
information on the console when running; | |||
<nobr><code>-verbose</code></nobr>, which causes Ant to print | |||
additional information to the console.</p> | |||
additional information to the console; and <nobr><code>-debug</code></nobr>, | |||
which causes Ant to print considerably more additional information. | |||
</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 | |||
<code>default</code> attribute of the | |||
<a href="using.html#projects"><code>project</code></a> tag is | |||
used.</p> | |||
<p>The <nobr><code>-projecthelp</code></nobr> option prints out the | |||
description of the project, if it exists, followed by a list of this | |||
project's targets. First those with a description, then those without | |||
one.</p> | |||
<p>The <nobr><code>-projecthelp</code></nobr> option prints out a list | |||
of the buildfile's targets, along with the | |||
text in the <code>description</code> attribute of the target, | |||
if one was specified, followed by a list of those targets without one.</p> | |||
<p>Command-line option summary:</p> | |||
<h3><a name="options">Command-line Options Summary</a></h3> | |||
<pre>ant [options] [target [target2 [target3] ...]] | |||
Options: | |||
-help print this message | |||
@@ -91,7 +99,7 @@ target called <code>dist</code>.</p> | |||
target called <code>dist</code>, setting the <code>build</code> property to the | |||
value <code>build/classes</code>.</p> | |||
<h3>Files</h3> | |||
<h3><a name="files">Files</a></h3> | |||
<p>The Ant wrapper script for Unix will source (read and evaluate) the | |||
file <code>~/.antrc</code> before it does anything - the Windows batch | |||
@@ -100,7 +108,7 @@ file invokes <code>%HOME%\antrc_pre.bat</code> at the start and | |||
files to set/unset environment variables that should only be visible | |||
during the execution of Ant. See the next section for example.</p> | |||
<h3>Environment Variables</h3> | |||
<h3><a name="envvars">Environment Variables</a></h3> | |||
<p>The wrapper scripts use the following environment variables (if | |||
set):</p> | |||
@@ -118,7 +126,7 @@ set):</p> | |||
include the <code>-find</code> flag.</li> | |||
</ul> | |||
<h2>Running Ant by Hand</h2> | |||
<h2><a name="viajava">Running Ant via Java</a></h2> | |||
<p>If you have installed Ant in the do-it-yourself way, Ant can be started | |||
with:</p> | |||
<blockquote> | |||
@@ -0,0 +1,22 @@ | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Language" content="en-us"> | |||
<title>Apache Ant User Manual</title> | |||
<base target="mainFrame"> | |||
</head> | |||
<body> | |||
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2> | |||
<h3>Running Ant</h3> | |||
<a href="running.html#commandline">Command Line</a><br> | |||
<a href="running.html#options">Options</a><br> | |||
<a href="running.html#files">Files</a><br> | |||
<a href="running.html#envvars">Environment Variables</a><br> | |||
<a href="running.html#viajava">Running Ant via Java</a><br> | |||
</body> | |||
</html> | |||
@@ -10,13 +10,13 @@ | |||
<h2>Table of Contents</h2> | |||
<a href="intro.html">Introduction</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="installlist.html" target="navFrame">Installing Ant</a><br> | |||
<a href="usinglist.html" target="navFrame">Using Ant</a><br> | |||
<a href="runninglist.html" target="navFrame">Running Ant</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="ide.html" target="navFrame">Editor/IDE Integration</a><br> | |||
<a href="develop.html">Developing with Ant</a><br> | |||
<a href="developlist.html" target="navFrame">Developing with Ant</a><br> | |||
<a href="api/index.html" target="_top">Ant API</a><br> | |||
<a href="LICENSE">License</a><br> | |||
<a href="feedback.html">Feedback</a><br><br> | |||
@@ -8,12 +8,13 @@ | |||
<body> | |||
<h1>Using Ant</h1> | |||
<h2><a name="buildfile">Writing a Simple Buildfile</a></h2> | |||
<p>Ant's buildfiles are written in XML. Each buildfile contains one project.</p> | |||
<p>Each task element of the buildfile can have an <code>id</code> attribute and | |||
<p>Ant's buildfiles are written in XML. Each buildfile contains one project | |||
and at least one (default) target. Targets contain task elements. | |||
Each task element of the buildfile can have an <code>id</code> attribute and | |||
can later be referred to by the value supplied to this. The value has | |||
to be unique. (For additional information, see the | |||
<a href="#tasks"> Tasks</a> section below.)</p> | |||
<h3>Projects</h3> | |||
<h3><a name="projects">Projects</a></h3> | |||
<p>A <i>project</i> has three attributes:</p> | |||
<table border="1" cellpadding="2" cellspacing="0"> | |||
<tr> | |||
@@ -43,7 +44,7 @@ to be unique. (For additional information, see the | |||
</tr> | |||
</table> | |||
<p>Optionally, a description for the project can be provided as a | |||
top-level <description> element (see the <a | |||
top-level <code><description></code> element (see the <a | |||
href="CoreTypes/description.html">description</a> type).</p> | |||
<p>Each project defines one or more <i>targets</i>. | |||
@@ -52,7 +53,7 @@ to be executed. When starting Ant, you can select which target(s) you | |||
want to have executed. When no target is given, | |||
the project's default is used.</p> | |||
<h3>Targets</h3> | |||
<h3><a name="targets">Targets</a></h3> | |||
<p>A target can depend on other targets. You might have a target for compiling, | |||
for example, and a target for creating a distributable. You can only build a | |||
distributable when you have compiled first, so the distribute target | |||
@@ -161,7 +162,7 @@ Tasks can be assigned an <code>id</code> attribute: | |||
<pre><<i>taskname</i> id="<i>taskID</i>" ... /></pre> | |||
</blockquote> | |||
where <i>taskname</i> is the name of the task, and <i>taskID</i> is | |||
a unique name for this task. | |||
a unique identifier for this task. | |||
You can refer to the | |||
corresponding task object in scripts or other tasks via this name. | |||
For example, in scripts you could do: | |||
@@ -187,17 +188,17 @@ be backward-compatible with this behaviour, since there will likely be no | |||
task instances at all, only proxies. | |||
</p> | |||
<h3>Properties</h3> | |||
<h3><a name="properties">Properties</a></h3> | |||
<p>A project can have a set of properties. These might be set in the buildfile | |||
by the <a href="CoreTasks/property.html">property task</a>, or might be set outside Ant. A | |||
property has a name and a value, the name is case sensitive. Properties may be used in the value of | |||
by the <a href="CoreTasks/property.html">property</a> task, or might be set outside Ant. A | |||
property has a name and a value; the name is case-sensitive. Properties may be used in the value of | |||
task attributes. This is done by placing the property name between | |||
"<code>${</code>" and "<code>}</code>" in the | |||
attribute value. For example, | |||
if there is a "builddir" property with the value | |||
"build", then this could be used in an attribute like this: | |||
<code>${builddir}/classes</code>. | |||
This is resolved as <code>build/classes</code>.</p> | |||
This is resolved at run-time as <code>build/classes</code>.</p> | |||
<h3><a name="built-in-props">Built-in Properties</a></h3> | |||
<p>Ant provides access to all system properties as if they had been | |||
@@ -219,7 +220,7 @@ ant.java.version the JVM version Ant detected; currently it can hold | |||
the values "1.1", "1.2", "1.3" and "1.4". | |||
</pre> | |||
<h3>Example</h3> | |||
<a name="example"><h3>Example Buildfile</h3></a> | |||
<pre> | |||
<project name="MyProject" default="dist" basedir="."> | |||
@@ -256,16 +257,16 @@ ant.java.version the JVM version Ant detected; currently it can hold | |||
</project> | |||
</pre> | |||
<h3>Token Filters</h3> | |||
<a name="filters"><h3>Token Filters</h3></a> | |||
<p>A project can have a set of tokens that might be automatically expanded if | |||
found when a file is copied, when the filtering-copy behavior is selected in the | |||
tasks that support this. These might be set in the buildfile | |||
by the <a href="CoreTasks/filter.html">filter task</a>. </p> | |||
by the <a href="CoreTasks/filter.html">filter</a> task.</p> | |||
<p>Since this can potentially be a very harmful behavior, | |||
the tokens in the files <b>must</b> | |||
be of the form <code>@</code><i>token</i><code>@</code>, where | |||
<i>token</i> is the token name that is set | |||
in the filter task. This token syntax matches the syntax of other build systems | |||
in the <code><filter></code> task. This token syntax matches the syntax of other build systems | |||
that perform such filtering and remains sufficiently orthogonal to most | |||
programming and scripting languages, as well as with documentation systems.</p> | |||
<p>Note: If a token with the format <code>@</code><i>token</i><code>@</code> | |||
@@ -411,9 +412,9 @@ that contain space characters, nested <code>arg</code> elements can be used.</p> | |||
<h3><a name="references">References</a></h3> | |||
<p>The <code>id</code> attribute of the buildfile's elements can be | |||
used to refer to them. This can useful if you are going to replicate | |||
used to refer to them. This can be useful if you are going to replicate | |||
the same snippet of XML over and over again - using a | |||
<code><classpath></code> structure more than once for | |||
<code><classpath></code> structure more than once, for | |||
example.</p> | |||
<p>The following example:</p> | |||
<blockquote><pre> | |||
@@ -0,0 +1,28 @@ | |||
<html> | |||
<head> | |||
<meta http-equiv="Content-Language" content="en-us"> | |||
<title>Apache Ant User Manual</title> | |||
<base target="mainFrame"> | |||
</head> | |||
<body> | |||
<h2><a href="toc.html" target="navFrame">Table of Contents</a></h2> | |||
<h3>Using Ant</h3> | |||
<a href="using.html#buildfile">Writing a Simple Buildfile</a><br> | |||
<a href="using.html#projects">Projects</a><br> | |||
<a href="using.html#targets">Targets</a><br> | |||
<a href="using.html#tasks">Tasks</a><br> | |||
<a href="using.html#properties">Properties</a><br> | |||
<a href="using.html#built-in-props">Built-in Properties</a><br> | |||
<a href="using.html#example">Example Buildfile</a><br> | |||
<a href="using.html#filters">Token Filters</a><br> | |||
<a href="using.html#path">Path-like Structures</a><br> | |||
<a href="using.html#arg">Command-line Arguments</a><br> | |||
<a href="using.html#references">References</a><br> | |||
</body> | |||
</html> | |||