summaryrefslogtreecommitdiff
path: root/docs/manual/using.html
diff options
context:
space:
mode:
authorDiane Holt <holtdl@apache.org>2002-03-25 19:39:41 +0000
committerDiane Holt <holtdl@apache.org>2002-03-25 19:39:41 +0000
commit039517550f18eed50763b81e4cdfbfb7335d4506 (patch)
treea29bf1b90bb81a7b69806e6eb410976e81058990 /docs/manual/using.html
parent11be3954a58817b0b16bb024a60375aeced289b6 (diff)
downloadant-039517550f18eed50763b81e4cdfbfb7335d4506.tar.gz
Add a little to the -projecthelp stuff, some more about if/unless,
fix a few typos, etc. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@272026 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/using.html')
-rw-r--r--docs/manual/using.html28
1 files changed, 19 insertions, 9 deletions
diff --git a/docs/manual/using.html b/docs/manual/using.html
index dc941c5f3..62661ebf0 100644
--- a/docs/manual/using.html
+++ b/docs/manual/using.html
@@ -90,18 +90,25 @@ should react to. For example:</p>
<pre>&lt;target name=&quot;build-module-A&quot; if=&quot;module-A-present&quot;/&gt;</pre>
<pre>&lt;target name=&quot;build-own-fake-module-A&quot; unless=&quot;module-A-present&quot;/&gt;</pre>
</blockquote>
+<p>In the first example, if the <code>module-A-present</code>
+property is set (to any value), the target will be run. In the second
+example, if the <code>module-A-present</code> property is set
+(again, to any value), the target will not be run.
+</p>
<p>If no <code>if</code> and no <code>unless</code> attribute is present,
the target will always be executed.</p>
<p>The optional <code>description</code> attribute can be used to provide a one-line description of this target, which is printed by the
<nobr><code>-projecthelp</code></nobr> command-line option. Targets
-without such a description are deemed internal and will not be listed.
+without such a description are deemed internal and will not be listed,
+unless either the <nobr><code>-verbose</code></nobr> or
+<nobr><code>-debug</code></nobr> option is used.
</p>
<p>It is a good practice to place your <a
href="CoreTasks/tstamp.html">tstamp</a> tasks in a so-called
<i>initialization</i> target, on which
all other targets depend. Make sure that target is always the first one in
the depends list of the other targets. In this manual, most initialization targets
-have the name &quot;init&quot;.</p>
+have the name <code>&quot;init&quot;</code>.</p>
<p>A target has the following attributes:</p>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
@@ -138,17 +145,20 @@ have the name &quot;init&quot;.</p>
<td align="center" valign="top">No</td>
</tr>
</table>
+</p>
A target name can be any alphanumeric string valid in the encoding of the XML
-file. The empty string "" is in this set, as is comma "," and space " ".
-Please avoid using these as they will not be supported in future ant versions
-because of all the confusion they cause. IDEs support of unusual target names
--or any target name containing spaces, varies with the IDE.
+file. The empty string &quot;&quot; is in this set, as is
+comma &quot;,&quot; and space &quot; &quot;.
+Please avoid using these, as they will not be supported in future Ant versions
+because of all the confusion they cause. IDE support of unusual target names,
+or any target name containing spaces, varies with the IDE.
<p>
-Targets beginning with a hyphen such as "-restart" are valid, and can be used
-to name targets which must not be called directly from the command like.
+Targets beginning with a hyphen such as <code>&quot;-restart&quot;</code>
+are valid, and can be used
+to name targets that should not be called directly from the command line.
<h3><a name="tasks">Tasks</a></h3>
<p>A task is a piece of code that can be executed.</p>
@@ -189,7 +199,7 @@ to set the <code>foo</code> attribute of this particular task instance.
In another task (written in Java), you can access the instance via
<code>project.getReference("task1")</code>.
<p>
-Note<sup>1</sup>: If "task1" has not been run yet, then
+Note<sup>1</sup>: If &quot;task1&quot; has not been run yet, then
it has not been configured (ie., no attributes have been set), and if it is
going to be configured later, anything you've done to the instance may
be overwritten.