I'm inheriting a project I need to maintain and trying to get the Ant deployment to Tomcat working on my localhost. When I run the deploy task, I get the following errors:
BUILD FAILED
/.../build.xml:69: Problem: failed to create task or type deploy
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
I've tried looking around at others having the same problem, and found that commonly issues were in relation to CLASSPATH and missing catalina-ant.jar.
I added catalina-ant.jar to a folder in my project, called lib-exec, and inside my build.xml, these jars are loaded with:
<path id="project.classpath">
<fileset dir="${libDirectory}" includes="**/*.jar" />
<fileset dir="${extLibDirectory}" includes="**/*.jar" />
</path>
and ${extLibDirectory} is defined as:
<property name="extLibDirectory" location="ext-lib" />
My setup is as follows:
- MAC OS X 10.8.4
- Tomcat 7.0.42.0 (installed via Homebrew)
- Java 1.6.0_51
- Apache Ant 1.8.4
I tried running the ant deploy task from the command line, and also added
export CLASSPATH=$CLASSPATH:/usr/local/Cellar/tomcat/7.0.42/libexec/lib
to *~/.bash_profile* to attempt to include catalina-ant.jar this way, but nothing seems to work.
Any ideas what I'm messing up?