Browse Source

PR: 32640

Updated FAQ with a reference to the manual for developing new tasks (and some more).
Bonus: some typo fixes.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277195 13f79535-47bb-0310-9956-ffa450edef68
master
Jacobus Martinus Kruithof 20 years ago
parent
commit
bfb2c6ca31
2 changed files with 38 additions and 7 deletions
  1. +19
    -4
      docs/faq.html
  2. +19
    -3
      xdocs/faq.xml

+ 19
- 4
docs/faq.html View File

@@ -212,7 +212,10 @@
</a></li> </a></li>
<li><a href="#adding-external-tasks"> <li><a href="#adding-external-tasks">
How do I add an external task that I've written to the How do I add an external task that I've written to the
page "External Tools and Task"?
page "External Tools and Tasks"?
</a></li>
<li><a href="#create-extensions">
How do I create new tasks?
</a></li> </a></li>
<li><a href="#passing-cli-args"> <li><a href="#passing-cli-args">
How do I pass parameters from the command line to my How do I pass parameters from the command line to my
@@ -646,7 +649,7 @@
<p class="faq"> <p class="faq">
<a name="adding-external-tasks"></a> <a name="adding-external-tasks"></a>
How do I add an external task that I've written to the How do I add an external task that I've written to the
page "External Tools and Task"?
page "External Tools and Tasks"?
</p> </p>
<p>Join and post a message to the dev or user mailing <p>Join and post a message to the dev or user mailing
list (one list is enough), including the following list (one list is enough), including the following
@@ -673,6 +676,18 @@
The procedure to add it is the same. The file to patch is <a href="http://cvs.apache.org/viewcvs.cgi/~checkout~/ant/xdocs/projects.xml">this</a> The procedure to add it is the same. The file to patch is <a href="http://cvs.apache.org/viewcvs.cgi/~checkout~/ant/xdocs/projects.xml">this</a>
document. The syntax of that file is the same.</p> document. The syntax of that file is the same.</p>
<p class="faq"> <p class="faq">
<a name="create-extensions"></a>
How do I create new tasks?
</p>
<p>Apart from a lot of information on using Ant, the
<a href="manual/index.html">Manual</a> also contains information
on how to extend Ant with new tasks. This information
can be found under "Developing with Ant".</p>
<p>Chances are that someone else already created the task you
want to create, it may be wise to see
<a href="external.html">External Tools and Tasks</a> and
<a href="projects.html">Related Projects</a> first.</p>
<p class="faq">
<a name="passing-cli-args"></a> <a name="passing-cli-args"></a>
How do I pass parameters from the command line to my How do I pass parameters from the command line to my
build file? build file?
@@ -869,7 +884,7 @@ shell-prompt&gt; m4 foo.m4 &gt; foo
</pre> </pre>
<p>Note: <code>&lt;antcall&gt;</code> tasks do <em>not</em> pass <p>Note: <code>&lt;antcall&gt;</code> tasks do <em>not</em> pass
property changes back up to the environment they were called property changes back up to the environment they were called
from, so you would'nt be able to, for example, set a
from, so you wouldn't be able to, for example, set a
<code>result</code> property in the <code>cond-if-3</code> target, <code>result</code> property in the <code>cond-if-3</code> target,
then do then do
<code>&lt;echo message="result is ${result}"/&gt;</code> <code>&lt;echo message="result is ${result}"/&gt;</code>
@@ -1108,7 +1123,7 @@ shell-prompt&gt; m4 foo.m4 &gt; foo
<code>pathelement</code> or <code>classpath refid</code>. <code>pathelement</code> or <code>classpath refid</code>.
</p> </p>
<p>When <code>ant</code> loads properties from an external <p>When <code>ant</code> loads properties from an external
file it dosn't touch the value of properties, trailing blanks
file it doesn't touch the value of properties, trailing blanks
will not be trimmed for example.</p> will not be trimmed for example.</p>
<p>If the value represents a file path, like a jar needed to <p>If the value represents a file path, like a jar needed to
compile, the task which requires the value, javac for example compile, the task which requires the value, javac for example


+ 19
- 3
xdocs/faq.xml View File

@@ -247,7 +247,7 @@


<faq id="adding-external-tasks"> <faq id="adding-external-tasks">
<question>How do I add an external task that I&apos;ve written to the <question>How do I add an external task that I&apos;ve written to the
page &quot;External Tools and Task&quot;?</question>
page &quot;External Tools and Tasks&quot;?</question>
<answer> <answer>


<p>Join and post a message to the dev or user mailing <p>Join and post a message to the dev or user mailing
@@ -279,6 +279,22 @@
The procedure to add it is the same. The file to patch is <a The procedure to add it is the same. The file to patch is <a
href="http://cvs.apache.org/viewcvs.cgi/~checkout~/ant/xdocs/projects.xml">this</a> href="http://cvs.apache.org/viewcvs.cgi/~checkout~/ant/xdocs/projects.xml">this</a>
document. The syntax of that file is the same.</p> document. The syntax of that file is the same.</p>

</answer>
</faq>
<faq id="create-extensions">
<question>How do I create new tasks?</question>
<answer>
<p>Apart from a lot of information on using Ant, the
<a href="manual/index.html">Manual</a> also contains information
on how to extend Ant with new tasks. This information
can be found under &quot;Developing with Ant&quot;.</p>
<p>Chances are that someone else already created the task you
want to create, it may be wise to see
<a href="external.html">External Tools and Tasks</a> and
<a href="projects.html">Related Projects</a> first.</p>
</answer> </answer>
</faq> </faq>


@@ -473,7 +489,7 @@ shell-prompt> m4 foo.m4 > foo


<p>Note: <code>&lt;antcall&gt;</code> tasks do <em>not</em> pass <p>Note: <code>&lt;antcall&gt;</code> tasks do <em>not</em> pass
property changes back up to the environment they were called property changes back up to the environment they were called
from, so you would&apos;nt be able to, for example, set a
from, so you wouldn&apos;t be able to, for example, set a
<code>result</code> property in the <code>cond-if-3</code> target, <code>result</code> property in the <code>cond-if-3</code> target,
then do then do
<code>&lt;echo message=&quot;result is ${result}&quot;/&gt;</code> <code>&lt;echo message=&quot;result is ${result}&quot;/&gt;</code>
@@ -770,7 +786,7 @@ shell-prompt> m4 foo.m4 > foo
<answer> <answer>


<p>When <code>ant</code> loads properties from an external <p>When <code>ant</code> loads properties from an external
file it dosn&apos;t touch the value of properties, trailing blanks
file it doesn&apos;t touch the value of properties, trailing blanks
will not be trimmed for example.</p> will not be trimmed for example.</p>


<p>If the value represents a file path, like a jar needed to <p>If the value represents a file path, like a jar needed to


Loading…
Cancel
Save