tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <>
Subject wrapping manager "undeploy" Ant task
Date Mon, 06 Feb 2006 13:25:06 GMT

I'm using the manager tasks for Ant to undeploy and deploy my WAR file 
in Tomcat, as shown below.  Sometimes, due to a previous processing 
error, there is nothing to "undeploy" (i.e., no webapp there) but the 
"deploy" task is still relevant and should still occur.  However, in 
these cases, my Ant target fails because the "undeploy" task returns a 
nothing-to-undeploy error.

Question:  How do I wrap the <undeploy/> task, so that if there is 
nothing to undeploy, the deploy task within this target will still 
activate?  Currently I am just commenting out the undeploy task when 
that situation occurs.


<target name="deploy" depends="war">

     <undeploy url="${tcManagerURL}" username="${tcUsername}" 
password="${tcPassword}" path="${apppath}"/>

     <deploy url="${tcManagerURL}" username="${tcUsername}" 
password="${tcPassword}" path="${apppath}" war="${}.war"/>


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

View raw message