Hello Ivan,
Thanks very much for your macrodef, it does the trick.
I only had to add a property definition pointing to my
catalina.home, and then it worked fine.
Am I right that the lines:
> <sysproperty key="catalina.home"
> value="${catalina.home}"/>
are passing my local catalina home to the property
of the same name in bootstrap.jar? (Just trying to
understand what's going on.)
Thanks again, and best wishes,
William BC Crandall
bc.crandall [around] earthlink.net
----- Original Message -----
From: "Ivan Ivanov" <[EMAIL PROTECTED]>
To: "Ant Users List" <[EMAIL PROTECTED]>
Sent: 10 June 2004 11:53 PM
Subject: Re: Tomcat startup/shutdown
> 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 <[EMAIL PROTECTED]>
> 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:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Friends. Fun. Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]