Wednesday, July 23, 2008

taskdef class. org.apache.catalina.ant.InstallTask cannot be found

If you get this error trying to run your ant build, this can fix it:

Copy the "catalina-ant.jar" file from $TOMCAT_HOME\server\lib to $ANT_HOME\lib

Updated: 20 Feb 2013

If you've updated to Tomcat 7 then somewhere along the way, the "InstallTask" has been deprecated and replaced with "DeployTask". If you edit your build script and replace it, it should work.  For more details, read here.

In order to get some of your other Tomcat 7 Catalina-Ant bits working (eg. StartTask, StopTask), follow Paul Grenyer's useful guide.

No comments: