stevel 2005/02/07 15:42:21 Modified: docs/manual/CoreTasks exec.html Log: minor doc updates Revision Changes Path 1.47 +12 -16 ant/docs/manual/CoreTasks/exec.html Index: exec.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/exec.html,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- exec.html 28 Jan 2005 16:11:40 -0000 1.46 +++ exec.html 7 Feb 2005 23:42:21 -0000 1.47 @@ -1,4 +1,4 @@ -html> + @@ -236,7 +236,7 @@ searchpath - When this attribute is true nested, then + When this attribute is true, then system path environment variables will be searched when resolving the location of the executable. since Ant 1.6.3 @@ -312,10 +312,11 @@ otherwise do nothing.

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 + +the documentation; 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.

Examples

  @@ -335,7 +336,7 @@
   system command.

  -<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 @@
   </exec>
   

Starts the ${browser} with the specified ${file} and end the -ant process. The browser will let be open.

+Ant process. The browser will remain.

   <exec executable="cat">
  @@ -367,14 +368,9 @@
   a file and a property, both named "redirector.err".
   
   
  -

Note: 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.

-

Note2: 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.

+

Note: 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.

Timeouts: If a timeout is specified, when it is reached the sub process is killed and a message printed to the log. The return --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org