|
@@ -441,6 +441,56 @@ location attributes of its own, so</p> |
|
|
<classpath path="${classpath}" /> |
|
|
<classpath path="${classpath}" /> |
|
|
</pre> |
|
|
</pre> |
|
|
|
|
|
|
|
|
|
|
|
<h3><a name="arg">Command line arguments</a></h3> |
|
|
|
|
|
|
|
|
|
|
|
<p>Several tasks take arguments that shall be passed to another |
|
|
|
|
|
process on the command line. To make it easier to specify arguments |
|
|
|
|
|
that contain space characters, nested elements can be used.</p> |
|
|
|
|
|
<table border="1" cellpadding="2" cellspacing="0"> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td width="12%" valign="top"><b>Attribute</b></td> |
|
|
|
|
|
<td width="78%" valign="top"><b>Description</b></td> |
|
|
|
|
|
<td width="10%" valign="top"><b>Required</b></td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">value</td> |
|
|
|
|
|
<td valign="top">a single command line argument, can contain space |
|
|
|
|
|
characters.</td> |
|
|
|
|
|
<td align="center" rowspan="4">Exactly one of these.</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">line</td> |
|
|
|
|
|
<td valign="top">a space delimited list of command line arguments.</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">file</td> |
|
|
|
|
|
<td valign="top">The name of a file as a single command line |
|
|
|
|
|
argument. Will be replaced with the absolute filename of the file |
|
|
|
|
|
by Ant.</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">path</td> |
|
|
|
|
|
<td valign="top">A string that shall be treated as a PATH like |
|
|
|
|
|
string as a single command line argument. You can use ; or : as |
|
|
|
|
|
path separators and Ant will convert it to the platform's local |
|
|
|
|
|
conventions.</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
</table> |
|
|
|
|
|
<h4>Examples</h4> |
|
|
|
|
|
<blockquote><pre> |
|
|
|
|
|
<arg value="-l -a" /> |
|
|
|
|
|
</pre></blockquote> |
|
|
|
|
|
<p>is a single command line argument containing a space character.</p> |
|
|
|
|
|
<blockquote><pre> |
|
|
|
|
|
<arg line="-l -a" /> |
|
|
|
|
|
</pre></blockquote> |
|
|
|
|
|
<p>stands for two separate command line arguments.</p> |
|
|
|
|
|
<blockquote><pre> |
|
|
|
|
|
<arg path="/dir;/dir2:\dir3" /> |
|
|
|
|
|
</pre></blockquote> |
|
|
|
|
|
<p>is a single command line argument with value |
|
|
|
|
|
<code>\dir;\dir2;\dir3</code> on DOS based systems and |
|
|
|
|
|
<code>/dir:/dir2:/dir3</code> on Unix like systems.</p> |
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="directorybasedtasks">Directory based tasks</a></h2> |
|
|
<h2><a name="directorybasedtasks">Directory based tasks</a></h2> |
|
|
<p>Some tasks use directory trees for the task they perform. For instance, the <a |
|
|
<p>Some tasks use directory trees for the task they perform. For instance, the <a |
|
@@ -1128,8 +1178,15 @@ systems.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">command</td> |
|
|
<td valign="top">command</td> |
|
|
<td valign="top">the command to execute.</td> |
|
|
|
|
|
<td align="center" valign="top">Yes</td> |
|
|
|
|
|
|
|
|
<td valign="top">the command to execute with all command line |
|
|
|
|
|
arguments. <b>deprecated, use executable and nested |
|
|
|
|
|
<code><arg></code> elements instead</b>.</td> |
|
|
|
|
|
<td align="center" rowspan="2">Exactly one of the two.</td> |
|
|
|
|
|
</tr> |
|
|
|
|
|
<tr> |
|
|
|
|
|
<td valign="top">executable</td> |
|
|
|
|
|
<td valign="top">the command to execute without any command line |
|
|
|
|
|
arguments.</b></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">dir</td> |
|
|
<td valign="top">dir</td> |
|
@@ -1148,6 +1205,12 @@ systems.</p> |
|
|
redirected.</td> |
|
|
redirected.</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
</tr> |
|
|
</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> |
|
|
<tr> |
|
|
<td valign="top">failonerror</td> |
|
|
<td valign="top">failonerror</td> |
|
|
<td valign="top">Stop the buildprocess if the command exits with a |
|
|
<td valign="top">Stop the buildprocess if the command exits with a |
|
@@ -1157,11 +1220,15 @@ systems.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<blockquote> |
|
|
<blockquote> |
|
|
<p><code><exec dir="${src}" command="dir" os="windows" |
|
|
|
|
|
|
|
|
<p><code><exec dir="${src}" executable="dir" os="windows" |
|
|
output="dir.txt" /></code></p> |
|
|
output="dir.txt" /></code></p> |
|
|
</blockquote> |
|
|
</blockquote> |
|
|
|
|
|
|
|
|
<h3>Parameters specified as nested elements</h3> |
|
|
<h3>Parameters specified as nested elements</h3> |
|
|
|
|
|
<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><a name="env">env</a></h4> |
|
|
<h4><a name="env">env</a></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 |
|
|
system command via nested <code><env></code> elements.</p> |
|
|
system command via nested <code><env></code> elements.</p> |
|
@@ -1198,7 +1265,7 @@ system command via nested <code><env></code> elements.</p> |
|
|
</table> |
|
|
</table> |
|
|
<h5>Examples</h5> |
|
|
<h5>Examples</h5> |
|
|
<blockquote><pre> |
|
|
<blockquote><pre> |
|
|
<exec command="emacs" > |
|
|
|
|
|
|
|
|
<exec executable="emacs" > |
|
|
<env key="DISPLAY" value=":1.0" /> |
|
|
<env key="DISPLAY" value=":1.0" /> |
|
|
</exec> |
|
|
</exec> |
|
|
</pre></blockquote> |
|
|
</pre></blockquote> |
|
@@ -1793,7 +1860,9 @@ the one that is currently running Ant.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">args</td> |
|
|
<td valign="top">args</td> |
|
|
<td valign="top">the arguments for the class that is executed.</td> |
|
|
|
|
|
|
|
|
<td valign="top">the arguments for the class that is |
|
|
|
|
|
executed. <b>deprecated, use nested <code><arg></code> |
|
|
|
|
|
elements instead.</b></td> |
|
|
<td align="center" valign="top">No</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
@@ -1817,15 +1886,15 @@ the one that is currently running Ant.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">jvmargs</td> |
|
|
<td valign="top">jvmargs</td> |
|
|
<td valign="top">the arguments to pass to the forked VM (ignored if fork is |
|
|
|
|
|
disabled)</td> |
|
|
|
|
|
|
|
|
<td valign="top">the arguments to pass to the forked VM (ignored |
|
|
|
|
|
if fork is disabled). <b>deprecated, use nested |
|
|
|
|
|
<code><arg></code> elements instead.</b></td> |
|
|
<td align="center" valign="top">No</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td valign="top">maxmemory</td> |
|
|
<td valign="top">maxmemory</td> |
|
|
<td valign="top">Max amount of memory to allocate to the forked VM |
|
|
<td valign="top">Max amount of memory to allocate to the forked VM |
|
|
(ignored if fork is disabled)</td> |
|
|
(ignored if fork is disabled)</td> |
|
|
<td align="center" valign="top">all</td> |
|
|
|
|
|
<td align="center" valign="top">No</td> |
|
|
<td align="center" valign="top">No</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
@@ -1836,12 +1905,18 @@ the one that is currently running Ant.</p> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
<h3>Parameters specified as nested elements</h3> |
|
|
<h3>Parameters specified as nested elements</h3> |
|
|
|
|
|
<h4>arg and jvmarg</h4> |
|
|
|
|
|
<p>Use nested <code><arg></code> and <code><jvmarg></code> |
|
|
|
|
|
elements to specify arguments for the or the forked VM. See <a |
|
|
|
|
|
href="index.html#arg">Command line arguments</a>.</p> |
|
|
|
|
|
<h4>classpath</h4> |
|
|
<p><code>Java</code>'s <em>classpath</em> attribute is a <a |
|
|
<p><code>Java</code>'s <em>classpath</em> attribute is a <a |
|
|
href="#path">PATH like structure</a> and can also be set via a nested |
|
|
href="#path">PATH like structure</a> and can also be set via a nested |
|
|
<em>classpath</em> element.</p> |
|
|
<em>classpath</em> element.</p> |
|
|
<h4>Example</h4> |
|
|
|
|
|
|
|
|
<h5>Example</h5> |
|
|
<pre> |
|
|
<pre> |
|
|
<java classname="test.Main" args="-h" > |
|
|
|
|
|
|
|
|
<java classname="test.Main" > |
|
|
|
|
|
<arg value="-h" /> |
|
|
<classpath> |
|
|
<classpath> |
|
|
<pathelement location="\test.jar" /> |
|
|
<pathelement location="\test.jar" /> |
|
|
<pathelement path="${java.class.path}" /> |
|
|
<pathelement path="${java.class.path}" /> |
|
@@ -1850,12 +1925,12 @@ href="#path">PATH like structure</a> and can also be set via a nested |
|
|
</pre> |
|
|
</pre> |
|
|
<h3>Examples</h3> |
|
|
<h3>Examples</h3> |
|
|
<pre> <java classname="test.Main" /></pre> |
|
|
<pre> <java classname="test.Main" /></pre> |
|
|
<pre> <java classname="test.Main" args="-h" /></pre> |
|
|
|
|
|
<pre> <java classname="test.Main" |
|
|
<pre> <java classname="test.Main" |
|
|
args="-h" |
|
|
|
|
|
fork="yes" |
|
|
|
|
|
jvmargs="-Xrunhprof:cpu=samples,file=log.txt,depth=3" |
|
|
|
|
|
/></pre> |
|
|
|
|
|
|
|
|
fork="yes" > |
|
|
|
|
|
<arg value="-h" /> |
|
|
|
|
|
<jvmarg value="-Xrunhprof:cpu=samples,file=log.txt,depth=3" /> |
|
|
|
|
|
</java> |
|
|
|
|
|
</pre> |
|
|
|
|
|
|
|
|
<hr> |
|
|
<hr> |
|
|
<h2><a name="javac">Javac</a></h2> |
|
|
<h2><a name="javac">Javac</a></h2> |
|
|