| alan.gibson@gmail.com 2004-12-22, 9:14 pm |
| i fixed this same problem by adding spawn="true" to the exec element. i
know this works with with ant 1.6 and above.
Chris Bedford wrote:
> response to goliv@jataayusoft.com
>
> thanks for your post ! I tried the same thing and it does not work
> for me.
> I'm running ant on windows 2k, if that makes any difference...
>
> Here's what i tried, verbatim, this launches tomcat, then ant waits
> forever:
>
> <target name="box" >
> <exec
> dir="d:/temp/TOMCAT/jakarta-tomcat-4.1.24/bin/"
>
executable="d:/temp/TOMCAT/jakarta-tomcat-4.1.24/bin/startup.bat">
> </exec>
> </target
>
>
> HOWEVER, I can actually suggest a solution at this point. It's
> complicated, but it worked for me.
>
> step 1) Download Bill Burton's scripts for launching ant in the
> background.
> details:
>
http://www.mail-archive.com/ant-use...g/msg23641.html
>
> step 2)
>
> add this target to Bill's script (you will want to change the path
> names
> to point to where your tomcat actually lives):
>
> <target name="exec_tomcat"
> description="Asynchronous Exec in a New Window">
> <exec executable="${antRunAsync}"
> dir="d:/temp/TOMCAT/jakarta-tomcat-4.1.24/bin/"
> vmlauncher="false"
> failonerror="true">
> <env key="ANTRUN_TITLE" value="${exec_title}" />
> <arg
line="d:/temp/TOMCAT/jakarta-tomcat-4.1.24/bin/startup.bat"
> />
> </exec>
> <sleep seconds="2" />
> <echo message="leaving target" />
> </target>
>
>
> Many thanks to Bill ! he rocks.
|