diff options
author | Diane Holt <holtdl@apache.org> | 2002-03-25 19:39:41 +0000 |
---|---|---|
committer | Diane Holt <holtdl@apache.org> | 2002-03-25 19:39:41 +0000 |
commit | 039517550f18eed50763b81e4cdfbfb7335d4506 (patch) | |
tree | a29bf1b90bb81a7b69806e6eb410976e81058990 /docs/manual/using.html | |
parent | 11be3954a58817b0b16bb024a60375aeced289b6 (diff) | |
download | ant-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.html | 28 |
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><target name="build-module-A" if="module-A-present"/></pre> <pre><target name="build-own-fake-module-A" unless="module-A-present"/></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 "init".</p> +have the name <code>"init"</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 "init".</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 "" 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. 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>"-restart"</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 "task1" 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. |