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: [email protected]
For additional commands, e-mail: [email protected]