Browse Source

documented the <execon> task.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267923 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 25 years ago
parent
commit
f929d4bc2b
1 changed files with 98 additions and 3 deletions
  1. +98
    -3
      docs/index.html

+ 98
- 3
docs/index.html View File

@@ -753,6 +753,7 @@ same patterns as the example before.</p>
<li><a href="#deltree">Deltree</a></li> <li><a href="#deltree">Deltree</a></li>
<li><a href="#echo">Echo</a></li> <li><a href="#echo">Echo</a></li>
<li><a href="#exec">Exec</a></li> <li><a href="#exec">Exec</a></li>
<li><a href="#exec">ExecOn</a></li>
<li><a href="#filter">Filter</a></li> <li><a href="#filter">Filter</a></li>
<li><a href="#fixcrlf">FixCRLF</a></li> <li><a href="#fixcrlf">FixCRLF</a></li>
<li><a href="#genkey">GenKey</a></li> <li><a href="#genkey">GenKey</a></li>
@@ -1453,6 +1454,99 @@ system command via nested <code>&lt;env&gt;</code> elements.</p>
<p>adds <code>${basedir}/bin</code> to the <code>PATH</code> of the <p>adds <code>${basedir}/bin</code> to the <code>PATH</code> of the
system command.</p> system command.</p>
<hr> <hr>
<h2><a name="exec">ExecOn</a></h2>
<h3>Description</h3>
<p>Executes a system command. When the <i>os</i> attribute is specified, then
the command is only executed when Ant is run on one of the specified operating
systems.</p>
<p>The files of a number of <a href="#fileset">FileSet</a>s are passed
as arguments to the system command. At least one nested
<code>&lt;fileset&gt;</code> or <code>&lt;filesetref&gt;</code> is
required.</p>
<h3>Parameters</h3>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
</tr>
<tr>
<td valign="top">executable</td>
<td valign="top">the command to execute without any command line
arguments.</b></td>
<td align="center" valign="top">Yes</td>
</tr>
<tr>
<td valign="top">dir</td>
<td valign="top">the directory in which the command should be executed.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">os</td>
<td valign="top">list of Operating Systems on which the command may be
executed.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">output</td>
<td valign="top">the file to which the output of the command should be
redirected.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">timeout</td>
<td valign="top">Stop the command if it doesn't finish within the
specified time (given in milliseconds).</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">failonerror</td>
<td valign="top">Stop the buildprocess if the command exits with a
returncode other than 0.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">parallel</td>
<td valign="top">Run the command only once, appending all files as
arguments. Defaults to true. If false, command will be executed
once for every file.</td>
<td align="center" valign="top">No</td>
</tr>
</table>
<h3>Parameters specified as nested elements</h3>
<h4>fileset and filesetref</h4>
<p>You can use any number of nested <code>&lt;fileset&gt;</code>
elements to define the files for this task and refer to
<code>&lt;fileset&gt;</code>s defined elsewhere via
<code>&lt;filesetref&gt;</code> elements.</p>
<h4>arg</h4>
<p>Command line arguments should be specified as nested
<code>&lt;arg&gt;</code> elements. See <a
href="index.html#arg">Command line arguments</a>.</p>
<h4>env</h4>
<p>It is possible to specify environment variables to pass to the
system command via nested <code>&lt;env&gt;</code> elements. See the
description in the section about <a href="#env">exec</a></p>
<p>Please note that the environment of the current Ant process is
<b>not</b> passed to the system command if you specify variables using
<code>&lt;env&gt;</code>.</p>
<h3>Examples</h3>
<blockquote><pre>
&lt;execon executable=&quot;ls&quot; &gt;
&lt;arg value=&quot;-l&quot; /&gt;
&lt;fileset dir=&quot;/tmp&quot;&gt;
&lt;patternset&gt;
&lt;exclude name=&quot;**/*.txt&quot; /&gt;
&lt;/patternset&gt;
&lt;/fileset&gt;
&lt;filesetref refid=&quot;other.files&quot; /&gt;
&lt;/execon&gt;
</pre></blockquote>
<p>invokes <code>ls -l</code>, adding the absolute filenames of all
files below <code>/tmp</code> not ending in <code>.txt</code> and all
files of the FileSet with <code>ID</code> <code>other.files</code> to
the command line.</p>
<hr>
<h2><a name="filter">Filter</a></h2> <h2><a name="filter">Filter</a></h2>
<h3>Description</h3> <h3>Description</h3>
<p>Sets a token filter for this project. Token filters are used by all tasks <p>Sets a token filter for this project. Token filters are used by all tasks
@@ -2008,7 +2102,7 @@ the one that is currently running Ant.</p>
<td valign="top">jvmargs</td> <td valign="top">jvmargs</td>
<td valign="top">the arguments to pass to the forked VM (ignored <td valign="top">the arguments to pass to the forked VM (ignored
if fork is disabled). <b>deprecated, use nested if fork is disabled). <b>deprecated, use nested
<code>&lt;arg&gt;</code> elements instead.</b></td>
<code>&lt;jvmarg&gt;</code> elements instead.</b></td>
<td align="center" valign="top">No</td> <td align="center" valign="top">No</td>
</tr> </tr>
<tr> <tr>
@@ -3399,6 +3493,7 @@ carried from zipfile.</p>
<h2><a name="untar">Untar</a></h2> <h2><a name="untar">Untar</a></h2>
<h3>Description</h3> <h3>Description</h3>
<p>Untars a tarfile.</p> <p>Untars a tarfile.</p>
<p>File permissions will not be restored on extracted files.</a>
<p>For JDK 1.1 "last modified time" field is set to current time instead of being <p>For JDK 1.1 "last modified time" field is set to current time instead of being
carried from tarfile.</p> carried from tarfile.</p>
<h3>Parameters</h3> <h3>Parameters</h3>
@@ -3652,7 +3747,7 @@ output.</p>
<h2><a name="ftp">FTP</a></h2> <h2><a name="ftp">FTP</a></h2>
<h3><b>Description:</b></h3> <h3><b>Description:</b></h3>
<p>Copies files from the local system to a remote ftp server.</p> <p>Copies files from the local system to a remote ftp server.</p>
<p>The <code>fileset</code> syntax must be used for specifying the local
<p>The <a href="#fileset"><code>fileset</code></a> syntax must be used for specifying the local
files to copy. All filesets will be copied into the single remote directory files to copy. All filesets will be copied into the single remote directory
specified by <i>remotedir</i>.</p> specified by <i>remotedir</i>.</p>
<p>The ftp task makes no attempt to determine what file system syntax is <p>The ftp task makes no attempt to determine what file system syntax is
@@ -4148,7 +4243,7 @@ elements.</p>
<h2><a name="script">Script</a></h2> <h2><a name="script">Script</a></h2>
<h3><b>Description:</b></h3> <h3><b>Description:</b></h3>
<p>Execute a script in a <p>Execute a script in a
<a href="http://www.alphaworks.ibm.com/tech/bsf">BSF</a> supported language.
<a href="http://oss.software.ibm.com/developerworks/opensource/bsf/">BSF</a> supported language.
<p>All items (tasks, targets, etc) of the running project are accessible <p>All items (tasks, targets, etc) of the running project are accessible
from the script. from the script.
<h3>Parameters:</h3> <h3>Parameters:</h3>


Loading…
Cancel
Save