<target name="webapp.check">
<fail unless="tomcat.url"
message="tomcat.url is not specified in local.properties file."/>
<fail unless="tomcat.manager.url"
message="tomcat.manager.url is not specified in local.properties file."/>
<fail unless="tomcat.manager.username"
message="tomcat.manager.username is not specified in local.properties file."/>
<fail unless="tomcat.manager.password"
message="tomcat.manager.password is not specified in local.properties file."/>
<condition property="tomcat.is.started">
<http url="${tomcat.url}"/>
</condition>
<condition property="webapp.is.deployed">
<and>
<isset property="tomcat.is.started"/>
<http url="${tomcat.url}/${ant.project.name}"/>
</and>
</condition>
</target>
<target name="undeploy" depends="webapp.check" if="webapp.is.deployed">
<taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask">
<classpath>
<path location="${tomcatHome}/server/lib/catalina-ant.jar"/>
</classpath>
</taskdef>
<remove url="${tomcat.manager.url}"
username="${tomcat.manager.username}"
password="${tomcat.manager.password}"
path="/${ant.project.name}"/>
</target>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
