Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

InstallTask not found

Tags:

spring

ant

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.

like image 823
wholladay Avatar asked Nov 08 '11 21:11

wholladay


1 Answers

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">
like image 197
martin clayton Avatar answered Oct 19 '22 23:10

martin clayton