Tom Elrod wrote:

Hello. I am trying to figure out a way to launch a bat file within ant and have it continue on with the ant build. I have seen a few post regarding this, but none of the suggestions from those posts are working for me. I am using ant 1.5.4 on Windows.

Hi Tom,

if you can upgrade to ant 1.6.1, you can use the exec task with the spawn attribute set to true.

like this :

<exec executable="cmd.exe" fork="true" spawn="true">
      <arg value="/C"/>
      <arg value="mybatch.bat"/>
      <arg value=">NUL"/>
       <arg value="2>&1"/>
</exec>

Note that I have included a redirection of stderr/stdout to NUL, because otherwise your script might die.
The reason being that there is currently no pumping of stdout/stderr for spawned scripts.


Antoine

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to