I'm going through the Spring MVC tutorial. I have a build.xml and build.properties file as well as a simple jsp file. When I try to run ant, I get this error:
Buildfile: /<home>/dev/Spring/springapp/build.xml
BUILD FAILED
/<home>/dev/Spring/springapp/build.xml:85: taskdef class org.apache.catalina.ant.InstallTask cannot be found
using the classloader AntClassLoader[/usr/local/apache-tomcat/current/lib/catalina-ant.jar]
Total time: 0 seconds
I looked in the catalina-ant.jar file, and sure enough there is no InstallTask class. Did this jar file change, since the spring tutorial was written? If so, where can I find the InstallTask.
The tutorial you are following is out of date - the InstallTask has been deprecated in favour of the DeployTask. Newer distributions no longer include the deprecated class. You should be able to revise your buildfile simply by changing 'Install' to 'Deploy', something like:
<taskdef name="install" classname="org.apache.catalina.ant.DeployTask">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With