Search code examples
ant

How to start separate process in Ant Task


I want to define target in Ant build file Something like this

<target name="startEclipse" >
      <exec executable="D:\Installable\eclipse\eclipse neon\eclipse.exe">
      </exec>
</target>

But problem is command "ant startEclipse" is not finished as long as eclipse is running. If I ctrl+z on Ant command, it stops eclipse too.


Solution

  • I found the answer, we have to add attribute spawn="true" In exec tag. If we don't provide default value is false. With true it will fork out another process for exec command.