java - Ant + Tomcat deploy "failed to create task or type deploy" -


i'm inheriting project need maintain , trying ant deployment tomcat working on localhost. when run deploy task, following errors:

build failed /.../build.xml:69: problem: failed create task or type deploy cause: name undefined. action: check spelling. action: check custom tasks/types have been declared. action: check <presetdef>/<macrodef> declarations have taken place. 

i've tried looking around @ others having same problem, , found commonly issues in relation classpath , missing catalina-ant.jar.

i added catalina-ant.jar folder in project, called lib-exec, , inside build.xml, these jars loaded with:

<path id="project.classpath">     <fileset dir="${libdirectory}" includes="**/*.jar" />     <fileset dir="${extlibdirectory}" includes="**/*.jar" /> </path> 

and ${extlibdirectory} defined as:

<property name="extlibdirectory" location="ext-lib" /> 

my setup 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 ant deploy task command line, , added

export classpath=$classpath:/usr/local/cellar/tomcat/7.0.42/libexec/lib 

to *~/.bash_profile* attempt include catalina-ant.jar way, nothing seems work.

any ideas i'm messing up?

in addition including tomcat classes in ant classpath, need define "deploy" task have ant recognize in build.xml file, using taskdef task (place @ top of build.xml).

defining paths , properties inside build.xml irrelevant classpath (when build.xml processed jvm running).

putting folder in classpath useless (you need include in classpath jar archives in folder instead).

moreover, there's no guarantee ant cares classpath environment variable; have inspect, , possibly change, ant launch script.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -