stevel 02/04/10 23:37:59
Modified: docs/manual/CoreTasks exec.html
Log:
PR5025 ; doc new attr, bit of text on failure altogether
Revision Changes Path
1.15 +25 -1 jakarta-ant/docs/manual/CoreTasks/exec.html
Index: exec.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/CoreTasks/exec.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- exec.html 5 Apr 2002 09:28:54 -0000 1.14
+++ exec.html 11 Apr 2002 06:37:59 -0000 1.15
@@ -81,6 +81,11 @@
<td align="center" valign="top">No</td>
</tr>
<tr>
+ <td valign="top">failifexecutionfails</td>
+ <td valign="top">Stop the build if we can't start the program.
+ Defaults to true. </td>
+ <td align="center" valign="top">No</td>
+ </tr> <tr>
<td valign="top">newenvironment</td>
<td valign="top">Do not propagate old environment when new environment
variables are specified.</td>
@@ -141,7 +146,26 @@
replaced by the absolute filename of the file by Ant.</td>
</tr>
</table>
-<h5>Examples</h5>
+
+<h3>Errors and return codes</h3>
+By default the return code of a <exec> is ignored; when you set
+<code>failonerror="true"</code> then any non zero response is treated as an
+error. 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).
+<p>
+If the attempt to start the program fails with an OS dependent error code,
+then <exec> halts the build unless <code>failifexecutionfails</code>
+is set. You can use that to run a program if it exists, but otherwise
+do nothing.
+<p>
+What do those error codes mean? Well, they are OS dependent. On Windows
+boxes you have to look in include\error.h in your windows compiler or wine
files;
+error code 2 means 'no such program', which usually means it is not on the
path.
+Any time you see such an error from any ant task, it is usually not an ant
bug,
+but some configuration problem on your machine.
+
+<h3>Examples</h3>
<blockquote><pre>
<exec executable="emacs" >
<env key="DISPLAY" value=":1.0"/>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>