Are you sure you deploying your app to the webapps directory? Did you do an "install" or a "deploy"? In Tomcat5, "install" has been deprecated and "deploy" should be used with the "localWar" attribute if you mean to deploy it to a local directory. In both cases, "deploy" without "localWar" will upload the war to the server and stick it either in "webapps" (Tomcat5) or in the work directory (Tomcat4.1). In both these cases, an "undeploy" should be used, not "remove". "install" and "remove" were meant to deploy an app to a local directory that Tomcat would not delete upon the "remove". Make sure to match up usage of deploy/undeploy and install/remove. Mixing these will give you unexpected results.
Jake
At 02:24 PM 4/24/2004 +0530, you wrote:
I am trying to deploy my webapps from ant, however my undeploy task does not always work. It quietly informs me that everything is ok, however the webapps subdirectory still exists, with at least some of the files still there. Tomcat appears to be holding onto locks on the files and they cannot be deleted. This is with both Tomcat 4 and Tomcat 5, running on Windows XP. Here is my ant code showing my undeploy task:
<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]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]