|
|
@@ -83,6 +83,13 @@ JVM. |
|
|
|
returncode other than 0. Default is "false"</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">resultproperty</td> |
|
|
|
<td valign="top">The name of a property in which the return code of the |
|
|
|
command should be stored. Only of interest if failonerror=false |
|
|
|
and if fork=true.</td> |
|
|
|
<td align="center" valign="top">No</td> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">dir</td> |
|
|
|
<td valign="top">The directory to invoke the VM in. (ignored if |
|
|
@@ -179,6 +186,16 @@ href="../using.html#path">PATH like structure</a> and can also be set via a nest |
|
|
|
forked VM via nested <i>env</i> elements. See the description in the |
|
|
|
section about <a href="exec.html#env">exec</a></p> |
|
|
|
<p>Settings will be ignored if fork is disabled.</p> |
|
|
|
|
|
|
|
<h3>Errors and return codes</h3> |
|
|
|
By default the return code of a <java> is ignored. Alternatively, you can set <code>resultproperty</code> to the name |
|
|
|
of a property and have it assigned to the result code (barring immutability, |
|
|
|
of course). |
|
|
|
When you set <code>failonerror="true"</code>, the only possible value for <code>resultproperty</code> is 0. Any non zero response is treated as an |
|
|
|
error and would mean the build exits. |
|
|
|
<p> Similarly, if <code>failonerror="false"</code> and <code>fork="false"</code> |
|
|
|
, then <code><java></code> <b>must</b> return 0 otherwise the build will exit, as the class was run by the build jvm.</p> |
|
|
|
|
|
|
|
<h3>Examples</h3> |
|
|
|
<pre> |
|
|
|
<java classname="test.Main"> |
|
|
@@ -218,7 +235,7 @@ and with a maximum memory of 128MB. Any non zero return code breaks the build. |
|
|
|
JVM, as it takes different parameters for other JVMs, |
|
|
|
That JVM can be started from <exec> if required. |
|
|
|
<hr> |
|
|
|
<p align="center">Copyright © 2000-2002 Apache Software Foundation. All rights |
|
|
|
<p align="center">Copyright © 2000-2003 Apache Software Foundation. All rights |
|
|
|
Reserved.</p> |
|
|
|
|
|
|
|
</body> |
|
|
|