ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Dekker <james.dek...@gmail.com>
Subject Problem with Undeploy Task in Tomcat 6
Date Mon, 14 Dec 2009 05:58:17 GMT
Hello there,

I am using Tomcat 6, Apache Ant 1.7.1 and JDK 1.6 on OS X Snow Leopard...

Am able to deploy my war into tomcat (via my Ant build script's deploy
target), but not with my undeploy target.

Excerpts from build.xml:

<target name="deploy" depends="compile">
    <jar jarfile="${build.dir}/${webapp.name}.war"
basedir="${webapp.build.dir}" />
    <!-- Copy the newly built WAR file into the deployment directory -->
    <copy file="${build.dir}/${webapp.name}.war"
todir="${tomcat.deployment.dir}" />
</target>

<target name="clean" description="Clears all generated files,
including build directories, distributables, and documentation.">
    <delete dir="${build.dir}"/>
</target>
	
<target name="undeploy" depends="clean" description="Remove
application in Tomcat">
    <undeploy url="${tomcat.manager.url}"
      username="${tomcat.username}"
      password="${tomcat.password}"
      path="/${webapp.name}"/>
</target>

When I run the deploy target, everything works (it places
myproject.war) underneath $CATALINA_HOME/webapps...

However, when I run the undeploy target, I get the following error message:

Buildfile: /Users/myuser/work/myproject/build.xml
Trying to override old definition of datatype resources
clean:
   [delete] Deleting directory /Users/myuser/work/myproject/build
undeploy:

BUILD FAILED
/Users/myuser/work/myproject/build.xml:83: java.io.IOException: Server
returned HTTP response code: 403 for URL:
http://localhost:8080/manager/undeploy?path=/myproject

Total time: 170 milliseconds

For a full description (containing the build.xml, admin.properties,
build.properties, tomcatTasks.properties, and tomcat-users.xml code
listings), please see this (I posted this to an online forum):

http://tinyurl.com/tomcat-undeploy-problem

Would really appreciate it if someone could help me.

Happy programming,

James

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message