See also http://marc.theaimsgroup.com/?l=ant-dev&m=104327322209168&w=2 

Bill and Jean-Francois both posted today with different solutions to the
same problem. Cheers, --DD

-----Original Message-----
From: Bill Burton [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 4:34 PM
To: Ant Users List
Subject: Re: Starting and Stopping Tomcat without hanging Ant

Hello,

I just posted a solution for this.  See 
http://marc.theaimsgroup.com/?l=ant-user&m=104322316306620&w=2.

Modifying what you have below to use the antRunAsync scripts would look 
like this:

<property name="antRunAsync" value="${ant.home}/bin/antRunAsync" />
<property name="tomcat.bin.dir" value="<my tomcat home>/bin"/>

<target name="startTomcat" description="starts Tomcat">

     <exec dir="${tomcat.bin.dir}" executable="${antRunAsync}"
           vmlauncher="false" failonerror="true">
        <env key="ANTRUN_TITLE" value="Apache Tomcat" />
        <!-- Or, the following to log all output to a file
        <env key="ANTRUN_OUTPUT" value="tomcat.log" /> -->
        <arg value="startup" />
     </exec>

</target>

Hope this helps,
-Bill

Peter Adelmann wrote:
> Hi,
> 
> I think I've already seen threads on this but is there a way to
successfully start Tomcat from Ant without hanging the Ant script?  I'm
trying to dynamically use HttpUnit to test JSP's and need to bounce Tomcat
so it picks up changes to the JSP's, however when I start Tomcat from the
script, the script hangs.  Of course once it hangs, stopping Tomcat is
pretty much out of the question. From what I've read, it appears that
there's not a way this can be done successfully.  
> 
> I've already tryed this: I set JAVA_HOME, and CATALINA_HOME for this task
in a batch file.  (The script actually is being run from CruiseControl.)
> 
> <propertyname="tomcat.bin.dir" value="<my tomcat home>/bin"/>
> 
> <target name="startTomcat" description="starts Tomcat">   
> 
>     <exec dir="${tomcat.bin.dir}" executable="cmd" os="Windows 2000">
>        <arg value="/c startup.bat"/>
>     </exec>
> 
> </target>
> 
> I'm hanging as well so any input would be appreciated...Peter


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

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

Reply via email to