|
@@ -1218,6 +1218,7 @@ cannot be found, try jakarta-regexp.</p> |
|
|
<li><a href="#tar">Tar</a></li> |
|
|
<li><a href="#tar">Tar</a></li> |
|
|
<li><a href="#taskdef">Taskdef</a></li> |
|
|
<li><a href="#taskdef">Taskdef</a></li> |
|
|
<li><a href="#touch">Touch</a></li> |
|
|
<li><a href="#touch">Touch</a></li> |
|
|
|
|
|
<li><a href="#transform">Transform</a></li> |
|
|
<li><a href="#tstamp">Tstamp</a></li> |
|
|
<li><a href="#tstamp">Tstamp</a></li> |
|
|
<li><a href="#unzip">Unjar</a></li> |
|
|
<li><a href="#unzip">Unjar</a></li> |
|
|
<li><a href="#untar">Untar</a></li> |
|
|
<li><a href="#untar">Untar</a></li> |
|
@@ -2174,7 +2175,7 @@ href="index.html#arg">Command line arguments</a>.</p> |
|
|
<h4>srcfile</h4> |
|
|
<h4>srcfile</h4> |
|
|
<p>By default the file names of the source files will be added to the |
|
|
<p>By default the file names of the source files will be added to the |
|
|
end of the command line. If you need to place it somewhere different, |
|
|
end of the command line. If you need to place it somewhere different, |
|
|
use a nested <code><srcfile> element between your |
|
|
|
|
|
|
|
|
use a nested <code><srcfile></code> element between your |
|
|
<code><arg></code> elements to mark the insertion point.</code> |
|
|
<code><arg></code> elements to mark the insertion point.</code> |
|
|
<h4>env</h4> |
|
|
<h4>env</h4> |
|
|
<p>It is possible to specify environment variables to pass to the |
|
|
<p>It is possible to specify environment variables to pass to the |
|
@@ -4498,6 +4499,123 @@ modification time to the current time.</p> |
|
|
modification time to Jun, 28 2000 2:02 pm (14:02 for those used to 24 |
|
|
modification time to Jun, 28 2000 2:02 pm (14:02 for those used to 24 |
|
|
hour times).</p> |
|
|
hour times).</p> |
|
|
<hr> |
|
|
<hr> |
|
|
|
|
|
<h2><a name="transform">Transform</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 and/or directories of a number of <a |
|
|
|
|
|
href="#fileset">FileSet</a>s are passed as arguments to the system |
|
|
|
|
|
command. The timestamp of each source file is compared to the |
|
|
|
|
|
timestamp of a target file which is defined by a nested <a |
|
|
|
|
|
href="#mapper">mapper</a> element. At least one fileset and exactly |
|
|
|
|
|
one mapper element are 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.</td> |
|
|
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">dest</td> |
|
|
|
|
|
<td valign="top">the directory where the target files will be placed.</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> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">type</td> |
|
|
|
|
|
<td valign="top">One of <em>file</em>, <em>dir</em> or |
|
|
|
|
|
<em>both</em>. If set to <em>file</em>, only the names of plain |
|
|
|
|
|
files will be sent to the command. If set to <em>dir</em>, only |
|
|
|
|
|
the names of directories are considered.</td> |
|
|
|
|
|
<td align="center" valign="top">No, default is <em>file</em></td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</table> |
|
|
|
|
|
<h3>Parameters specified as nested elements</h3> |
|
|
|
|
|
<h4>fileset</h4> |
|
|
|
|
|
<p>You can use any number of nested <code><fileset></code> |
|
|
|
|
|
elements to define the files for this task and refer to |
|
|
|
|
|
<code><fileset></code>s defined elsewhere.</p> |
|
|
|
|
|
<h4>arg</h4> |
|
|
|
|
|
<p>Command line arguments should be specified as nested |
|
|
|
|
|
<code><arg></code> elements. See <a |
|
|
|
|
|
href="index.html#arg">Command line arguments</a>.</p> |
|
|
|
|
|
<h4>srcfile</h4> |
|
|
|
|
|
<p>By default the file names of the source files will be added to the |
|
|
|
|
|
end of the command line. If you need to place it somewhere different, |
|
|
|
|
|
use a nested <code><srcfile></code> element between your |
|
|
|
|
|
<code><arg></code> elements to mark the insertion point.</code> |
|
|
|
|
|
<h4>targetfile</h4> |
|
|
|
|
|
<p><code><targetfile></code> is similar to |
|
|
|
|
|
<code><srcfile></code> and marks the position of the target |
|
|
|
|
|
filename on the command line. If omitted, the target filenames will |
|
|
|
|
|
not be added to the command line at all.</p> |
|
|
|
|
|
<h4>env</h4> |
|
|
|
|
|
<p>It is possible to specify environment variables to pass to the |
|
|
|
|
|
system command via nested <code><env></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><env></code>.</p> |
|
|
|
|
|
<h3>Examples</h3> |
|
|
|
|
|
<blockquote><pre> |
|
|
|
|
|
<transform executable="cc" dest="src/C" parallel="false"> |
|
|
|
|
|
<arg value="-c" /> |
|
|
|
|
|
<arg value="-o" /> |
|
|
|
|
|
<targetfile/> |
|
|
|
|
|
<srcfile/> |
|
|
|
|
|
<fileset dir="src/C" includes="*.c" /> |
|
|
|
|
|
<mapper type="glob" from="*.c" to="*.o" /> |
|
|
|
|
|
</transform> |
|
|
|
|
|
</pre></blockquote> |
|
|
|
|
|
<p>invokes <code>cc -c -o TARGETFILE SOURCEFILE</code> for each |
|
|
|
|
|
<code>.c</code> file that is newer than the corresponding |
|
|
|
|
|
<code>.o</code>, replacing TARGETFILE with the absolute filename of |
|
|
|
|
|
the <code>.o</code> and SOURCEFILE with the absolute name of the |
|
|
|
|
|
<code>.c</code> file.</p> |
|
|
|
|
|
<hr> |
|
|
<h2><a name="tstamp">Tstamp</a></h2> |
|
|
<h2><a name="tstamp">Tstamp</a></h2> |
|
|
<h3>Description</h3> |
|
|
<h3>Description</h3> |
|
|
<p>Sets the DSTAMP, TSTAMP and TODAY properties in the current project. The |
|
|
<p>Sets the DSTAMP, TSTAMP and TODAY properties in the current project. The |
|
|