Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error building a Project using Ant

 
Orby Sullivan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm new to Java and trying to do the following tutorial on Spring:

http://static.springsource.org/docs/Spring-MVC-step-by-step/part1.html

I'm getting the following error when i try build a Project using Ant:

C:\Users\Orby\workspace\Springapp>Ant
Buildfile: build.xml

BUILD FAILED
C:\Users\Orby\workspace\Springapp\build.xml:85: taskdef class org.apache.catalin
a.ant.InstallTask cannot be found

Total time: 0 seconds

My Ant build.properties file looks like:



and i found another URL referring to the same error:

http://www.coderanch.com/t/108299/tools/Error-while-running-ant-InstallTask

but i'm not sure what i need to do with the classpath in order to resolve this issue?

Any help on this would be appreciated.

Thanks,

O.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's a thread about this same problem, maybe this will help.
 
Orby Sullivan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response! I had read that article earlier and changed the slashes in my build.properties file but it hasn't resolved my error.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to Javaranch Orby!
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's a file "bin/catalina-tasks.xml" in your Tomcat install; read the comments there and import the file. Otherwise the tasks themselves are in server/lib/catalina-ant.jar, so you need to add that to your classpath, and possibly other jars as well.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic