ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Zeon <Andr...@hothouse.com.au>
Subject RE: Stopping and starting tomcat using ANT
Date Thu, 03 Apr 2003 03:12:42 GMT
Would anyone know what 'build.catalina.dir' would have to point to in the
script below?

Thanks. 



-----Original Message-----
From: David La France [mailto:d.lafrance@npcsystem.com]
Sent: Thursday, 3 April 2003 11:56 AM
To: Ant Users List
Subject: Re: Stopping and starting tomcat using ANT


Sure.  Try something like this.  Please excuse the mess.


 <!-- =================================================================== --

>
        <!-- Start Tomcat 4.X   via bootstrap                      -->
        <!-- make tomcat use the build catalina directory by specifying the 
-Dcatalina.base property -->
        <!-- 
=================================================================== -->>
        <target name="start.catalina" description="Start Catalina">
                <java classname="org.apache.catalina.startup.Bootstrap" 
fork="yes">
                        <jvmarg value="-Dcatalina.home=${CATALINA_HOME}"/>
                        <jvmarg value="- 
Dcatalina.base=${build.catalina.dir}"/>
                        <jvmarg value="-Xmx256m"/>
                        <arg value="start"/>
                        <classpath>
                                <fileset dir="${CATALINA_HOME}">
                                        <include name="bin/bootstrap.jar"/>
                                </fileset>
                                <pathelement 
location="${JAVA_HOME}/lib/tools.jar"/>
                        </classpath>
                </java>
                <!-- give tomcat time to start up -->
                <sleep seconds="5"/>
        </target>



        <!-- 
=================================================================== -->
        <!-- Stop Tomcat 4.X   via bootstrap                                
            -->
        <!-- 
=================================================================== -->     
  <target name="stop.catalina" description="Stop Catalina">
                <java classname="org.apache.catalina.startup.Bootstrap" 
fork="yes">
                        <jvmarg value="-Dcatalina.home=${CATALINA_HOME}"/>
                        <jvmarg value="- 
Dcatalina.base=${build.catalina.dir}"/>
                        <arg value="stop"/>
                        <classpath>
                                <fileset dir="${CATALINA_HOME}">
                                        <include name="bin/bootstrap.jar"/>
                                </fileset>
                        </classpath>
                </java>
        </target>



On Wed, 2 Apr 2003 15:43:08 +1000, Andrew Zeon <AndrewZ@hothouse.com.au> 
wrote:

> Is there a way I can stop and start a tomcat instance using ANT?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>




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

Mime
View raw message