I have an ant task which executes a lengthy build operation using <exec>
. Ant is started by a batch file from the windows command line. If I terminate the ant task by closing the window, the process started by <exec>
keeps running. How can I achieve to terminate the spawned process when the ant process itself is terminated?
Ant 1.10.0 is used on Windows 7 x64 with Oracle JDK 8. The task starting the process is similar to:
<exec executable="${make.executable}" dir="${compile.dir}" failonerror="true">
<arg line="${make.parameters}" />
</exec>
The java
process running ant is properly terminated when closing the command line window.