ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Launching Tomcat from Ant.
Date Wed, 05 Jan 2005 10:12:06 GMT

On Jan 4, 2005, at 5:41 PM, Donald Strong wrote:

> Hi all,
>
> I am having a problem launching tomcat from ant.
> It works fine when I run ant in a dos shell
> but not when I run ant from a cygwin shell.
>
>         <exec os="Windows 95, Windows 98, Windows Me, Windows NT, 
> Windows
> XP, Windows CE"
>               executable="${tomcat.dir}/bin/catalina.bat" spawn="true"
>               dir="${tomcat.dir}">
>             <arg line='jpda start'/>
>         </exec>
>         <echo message="Waiting for Tomcat to start..."/>
>         <waitfor maxwait="30" maxwaitunit="second"
>                  timeoutproperty="tomcat.failed">
>             <http url="${tomcat.manager.url}"/>
>         </waitfor>
>         <fail if="tomcat.failed"/>
>
> Any suggestions welcome.

I suggest switching to Jetty :) -

         <java classname="org.mortbay.jetty.Server" fork="true" 
maxmemory="128M">
             <classpath>
                 <fileset dir="${jetty.dir}">
                     <include name="lib/*.jar"/>
                     <include name="ext/*.jar"/>
                 </fileset>
                 <path refid="web.classpath"/>
             </classpath>

             <arg value="config/jetty.xml"/>
         </java>

You'd then be able to reduce your <waitfor> to far far less than the 30 
seconds you currently have!

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message