ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Parag Doke <parag.d...@gmail.com>
Subject Re: execute script in background with ANT
Date Sat, 23 Jul 2011 12:03:05 GMT
The ant manual for the exec task:
http://ant.apache.org/manual/Tasks/exec.html
talks about the spawn attribute. Here is the description:
whether or not you want the command to be spawned
Default is false.
If you spawn a command, its output will not be logged by ant.
The input, output, error, and result property settings are not active
when spawning a process.
since Ant 1.6

Try:
<exec executable="/bin/bash" spawn="true">
       <arg line='-c "runprocess.sh > out.out 2 > err.txt < /dev/null &"'
/>
</exec>
<echo> "Done............."</echo>

Hope this helps,
Parag Doke
Save paper, save trees. Do not print emails/documents unless
absolutely necessary.



On Sat, Jul 23, 2011 at 4:12 PM, vino_hymi <vinohymi@gmail.com> wrote:
> Hi,
>
> I am running script in background with exec task in ant file. But the issue
> is ant target waits for the script execution to complete.
>
> But ideally, I want script to execute in background and move further other
> targets in build.xml.
>
>
> <exec executable="/bin/bash" >
>        <arg line='-c "runprocess.sh > out.out 2 > err.txt < /dev/null
&"'
> />
> </exec>
> <echo> "Done............."</echo>
>
> Any help?
>
> -Vinodh
>
> --
> View this message in context: http://ant.1045680.n5.nabble.com/execute-script-in-background-with-ANT-tp4625842p4625842.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message