|
|
@@ -1,4 +1,4 @@ |
|
|
|
html> |
|
|
|
<html> |
|
|
|
|
|
|
|
<head> |
|
|
|
<meta http-equiv="Content-Language" content="en-us"> |
|
|
@@ -236,7 +236,7 @@ or the task will fail as follows: |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<td valign="top">searchpath</td> |
|
|
|
<td valign="top">When this attribute is true nested, then |
|
|
|
<td valign="top">When this attribute is true, then |
|
|
|
system path environment variables will |
|
|
|
be searched when resolving the location |
|
|
|
of the executable. <em>since Ant 1.6.3</em></td> |
|
|
@@ -312,10 +312,11 @@ is set to <code>false</code>. You can use that to run a program if it exists, bu |
|
|
|
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. |
|
|
|
boxes you have to look at |
|
|
|
<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/base/system_error_codes__0-499_.asp"> |
|
|
|
the documentation</a>; 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> |
|
|
@@ -335,7 +336,7 @@ but some configuration problem on your machine. |
|
|
|
system command.</p> |
|
|
|
|
|
|
|
<blockquote><pre> |
|
|
|
<property name="browser" location="C:/Programme/Internet Explorer/iexplore.exe"/> |
|
|
|
<property name="browser" location="C:/Program Files/Internet Explorer/iexplore.exe"/> |
|
|
|
<property name="file" location="ant/docs/manual/index.html"/> |
|
|
|
|
|
|
|
<exec executable="${browser}" spawn="true"> |
|
|
@@ -343,7 +344,7 @@ system command.</p> |
|
|
|
</exec> |
|
|
|
</pre></blockquote> |
|
|
|
<p>Starts the <i>${browser}</i> with the specified <i>${file}</i> and end the |
|
|
|
ant process. The browser will let be open.</p> |
|
|
|
Ant process. The browser will remain.</p> |
|
|
|
|
|
|
|
<blockquote><pre> |
|
|
|
<exec executable="cat"> |
|
|
@@ -367,14 +368,9 @@ in a property of the same name. Similarly, error output is sent to |
|
|
|
a file and a property, both named "redirector.err". |
|
|
|
|
|
|
|
|
|
|
|
<p><b>Note:</b> Although it may work for you to specify arguments using |
|
|
|
a simple arg-element and separate them by spaces it may fail if you switch to |
|
|
|
a newer version of the JDK. JDK < 1.2 will pass these as separate arguments |
|
|
|
to the program you are calling, JDK >= 1.2 will pass them as a single |
|
|
|
argument and cause most calls to fail.</p> |
|
|
|
<p><b>Note2:</b> If you are using Ant on Windows and a new DOS-Window pops up |
|
|
|
for every command which is executed this may be a problem of the JDK you are using. |
|
|
|
This problem may occur with all JDK's < 1.2.</p> |
|
|
|
<p><b>Note:</b> do not try to specify arguments using |
|
|
|
a simple arg-element and separate them by spaces. This results in |
|
|
|
only a single argument containing the entire string.</p> |
|
|
|
<p> |
|
|
|
<b>Timeouts: </b> If a timeout is specified, when it is reached the |
|
|
|
sub process is killed and a message printed to the log. The return |
|
|
|