I am trying to install tomcat on red hat enterprise server 8 with ant and apache. However when trying to run ant (to compile a simple servlet I get the following error).
/build.xml:146: taskdef class org.apache.catalina.ant.DeployTask cannot be found Using the simple build file I get the following error trying to run the ant. I have searched everything I could find on google, and almost certain its a classpath issue, however I have tried to alter the classpath in several ways to make what I think are the appropriate jars visible and I am at a loss. I have installed the following On red hat enterprise 8 , Apache/2.0.46 already in place Jdk1.5.0-03 tar, Tomcat 5.5.9 tar, mod_jk 1.2.10 built .so and placed under apache shared objects Also installed ant version 1.6.3 CATALINA_HOME=/usr/local/jakarta-tomcat ANT_HOME=/usr/local/apache-ant-1.6.3 JAVA_HOME=/usr/java/jdk1.5.0_03" I have already copied the catalina-ant jar from $CATALINA_HOME/server/lib to $ANT_HOME/lib, I also tried copying the caalina-deployer.jar from the tomcat deployer into the same location. If I comment out the taskdefs in the build.xml I can get ant to build the war for a simple servlet application Here are the lines that are causing failure in to build.xml <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/> <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/> <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/> <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/> If I comment them out then I can run ant. However in order to allow them to be there so I can deploy via ant I have tried several things, 1. placing the catalina-ant.jar in the classpath environment variable. 2.I added a classpath element to each of these tasks, like <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"> <classpath> <pathelement location="/usr/local/apache-ant-1.6.3/lib/catalina-ant.jar"/> <pathelement location="/usr/local/apache-ant-1.6.3/lib/catalina-deployer.jar"/> </classpath> </taskdef> 3. However the error persists, as I mentioned I googled this and found that I should just copy the Catalina-ant.jar and Catalina-deployer.jar to apache ant lib directory however this is not solving my problem. Thanks in advance for any help, RS