You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mighty Tornado <mi...@gmail.com> on 2009/04/02 19:23:56 UTC

Restarting Tomcat from Ant

Hi,
I currently copy the Application files to CATALINA_HOME/webapps from Ant,
and then run shutdown and startup. Is there a way to also restart the server
from Ant?

Thanks,

Re: Restarting Tomcat from Ant

Posted by Mighty Tornado <mi...@gmail.com>.
This worked:

<target name="start-tomcat">

<exec os="Mac OS X" executable="/bin/sh">

<arg line="${TOMCAT}/bin/startup.sh" />

</exec>

</target>

On Fri, Apr 3, 2009 at 7:19 AM, Gregor Schneider <rc...@googlemail.com>wrote:

> How about
>
> <exec dir="${TOMCAT}/bin/" executable="./shutdown.sh" />
>
> Rgds
>
> Gregor
> --
> just because your paranoid, doesn't mean they're not after you...
> gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
> gpgp-key available
> @ http://pgpkeys.pca.dfn.de:11371
> @ http://pgp.mit.edu:11371/
> skype:rc46fi
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: Restarting Tomcat from Ant

Posted by Gregor Schneider <rc...@googlemail.com>.
How about

<exec dir="${TOMCAT}/bin/" executable="./shutdown.sh" />

Rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Restarting Tomcat from Ant

Posted by Mighty Tornado <mi...@gmail.com>.
I tried the following Chuck,

<target name="stop-tomcat">

     <exec dir="${TOMCAT}/bin/" executable="shutdown.sh" />

</target>
 but it tells me that the script cannot be found



On Thu, Apr 2, 2009 at 2:21 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Mighty Tornado [mailto:mighty.tornado@gmail.com]
> > Subject: Restarting Tomcat from Ant
> >
> > Is there a way to also restart the server
> > from Ant?
>
> Why don't you just use the startup and shutdown scripts that come with
> Tomcat?  If you want to call them from within an ant script, use the <exec>
> task.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you received
> this in error, please contact the sender and delete the e-mail and its
> attachments from all computers.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: Restarting Tomcat from Ant

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Mighty Tornado [mailto:mighty.tornado@gmail.com]
> Subject: Restarting Tomcat from Ant
> 
> Is there a way to also restart the server
> from Ant?

Why don't you just use the startup and shutdown scripts that come with Tomcat?  If you want to call them from within an ant script, use the <exec> task.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Restarting Tomcat from Ant

Posted by Ravi Sharma <pi...@gmail.com>.
try sshexec task
http://ant.apache.org/manual/OptionalTasks/sshexec.html


On Thu, Apr 2, 2009 at 6:23 PM, Mighty Tornado <mi...@gmail.com>wrote:

> Hi,
> I currently copy the Application files to CATALINA_HOME/webapps from Ant,
> and then run shutdown and startup. Is there a way to also restart the
> server
> from Ant?
>
> Thanks,
>