ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Burton <bi...@progress.com>
Subject Re: Starting and Stopping Tomcat without hanging Ant
Date Wed, 22 Jan 2003 22:33:59 GMT
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message