ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antoine Levy Lambert <>
Subject Re: Tomcat Client Deployer
Date Fri, 05 Mar 2010 13:11:56 GMT
Hello Kaushal,

the easiest is to install ant on the remote host and kick off ant 
remotely, maybe from another ant process.

ant can do all what you want (backing up, copying, deleting, ...). Just 
open the manual.

Maybe develop/test your deployment script on the server where tomcat is 
running first.

When you get it to do what you want, start invoking it remotely.

If the remote invocation is from ant, you can do it using the <sshexec/> 

If you need to pass parameters to the deployment scripts running on the 
tomcat host, then use -D on the command line

for instance you can do something like

<sshexec host="" .... command=". ~/.profile; /opt/ant/bin/ant 
-f deploy.xml -Dtomcat.warfile=/tmp/abc.war"/>

(complete the password or identity file attributes of sshexec as 



Kaushal Shriyan wrote:
> On Fri, Mar 5, 2010 at 10:55 AM, Kaushal Shriyan
> <> wrote:
>> On Thu, Mar 4, 2010 at 6:57 PM, Antoine Levy Lambert <> wrote:
>>> Hi,
>>> If you want to start/stop tomcat using a script on a remote server, maybe
>>> you need to use the <sshexec/> task,
>>> assuming you have a ssh server on the remote server.
>>> Regards,
>>> Antoine
>> Thanks Antoine :)
> Hi,
> We face issues whenever we deploy application using tomcat manager we
> used to face the situation where new
> changes were not reflected. On stopping, cleaning work folder and
> starting tomcat again application used to get deployed properly. But
> to restart and clean we need to ssh again on the machine where we want
> to deploy defeating our main purpose.
> Also one more issue we have faced is we are not able to locate the new
> war file where Tomcat manager has deployed it
> We need to have a tool that does the following on specified remote hosts
> 1. stop the tomcat
> 2. back up the existing war
> 3. remove existing wars and folders and copy the new war
> 4. start the tomcat again
> Are the above steps possible using ant or is there a better and
> efficient way to do it ?
> Please suggest/guide.
> Thanks and Regards,
> Kaushal

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message