ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Tomcat startup/shutdown
Date Fri, 11 Jun 2004 06:53:30 GMT
Hello Willian,

I wrote a macrodef for a quick way to start/stop
tomcat. Here it is:

<macrodef name="tomcat.utils" description="Macrodef
for starting/stopping Tomcat">
    <!-- the action passed to tomcat bootstrap process
-->
    <attribute name="action"/>
    <sequential>
        <java
classname="org.apache.catalina.startup.Bootstrap"
fork="yes" failonerror="yes">
            <classpath>
                <pathelement
location="${catalina.home}/bin/bootstrap.jar"/>
            </classpath>
            <arg value="@{action}"/>
            <sysproperty key="catalina.home"
value="${catalina.home}"/>
        </java>
    </sequential>
</macrodef>

Then I invoked this macrodef in a target in this way
<tomcat.utils action="start"/> <!-- Start tomcat -->
<tomcat.utils action="stop"/> <!-- Start tomcat -->

HTH Ivan

--- William BC Crandall <bc.crandall@earthlink.net>
wrote:
> 
> Greetings, fellow Antophiles,
> 
> Eric Burke and Brian Coyner state that "As of [March
> 2003]
> there is no generic way to [start and stop Tomcat
> from Ant]."
> 
> They then offer some classes to do just that. (In
> _Java
> Extreme Programming Cookbook_, p. 245, with code
> samples
> available at
> http://examples.oreilly.com/jextprockbk/
> 
> In the last year and a half, has anyone devised an
> Ant task
> for this? Or is their code the best place to start? 
> 
> Thanks to all for any pointers.
> 
> Best wishes,
> 
> William BC Crandall
> bc.crandall [around] earthlink.net
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 



	
		
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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


Mime
View raw message