• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant: InstallTask (etc.) cannot be found

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know if this is an Ant problem or an Eclipse problem, but I thought I'd start here. As background, a web app project got dumped into my lap when it was abruptly un-outsourced when the consultants walked off in a huff. They are emphatically not available for questions. The app was developed under using Eclipse and Java 5 to run under Tomcat. There are many, many problems but the one right now is getting the project set up under my copy of Eclipse. I followed their instructions up to the point where I attempt the Ant Build, and I get the following:

BUILD FAILED
C:\Java\PGME\build\build.xml:208: taskdef class org.apache.catalina.ant.InstallTask cannot be found

Looking at build.xml in Eclipse I see that it will also fail to find ReloadTask, ListTask, StartTask, and StopTask. All of those classes are present in catalina-ant.jar, so the jar file must not be in the expected location. Here's a fragment of build.xml:


ANT_HOME is
C:\Program Files\apache-ant-1.8.2 (I installed that this afternoon, previously trying 1.6.5)

I copied catalina-ant.jar to the lib folder of both 1.8.2 and 1.6.5.

CATALINA_HOME is
C:\Program Files\Apache Software Foundation\jakarta-tomcat-5.0.28

CLASSPATH is
.;C:\orion\orion.jar;C:\Program Files\Java\jdk1.5.0_12\lib\dt.jar;C:\Program Files\Java\jdk1.5.0_12\lib\tools.jar;C:\Program Files\glassfish-v2ur1\lib\javaee.jar;C:\Java;C:\Java\RanchCommon\jr.jar

Path is
C:\PROGRA~1\Borland\Delphi5\Projects\Bpl;C:\PROGRA~1\Borland\vbroker\jre\Bin;C:\PROGRA~1\Borland\vbroker\Bin;C:\PROGRA~1\Borland\Delphi5\Bin;C:\Program Files\Borland\Delphi7\Bin;C:\Program Files\Borland\Delphi7\Projects\Bpl\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\jEdit;C:\Program Files\Java\jdk1.5.0_12\bin;C:\Program Files\apache-ant-1.8.2\bin;C:\WINDOWS\system32\WindowsPowerShell\v1.0;c:\

I'm hoping that I'm merely making an ignorant mistake. A few months ago I was able to build the project on this computer . . . before the hard drive got blown away, taking with it the tweaks that got it "buildable" last time (and which I unfortunately didn't write down).

I'm happy to provide any additional information.

-- Desperate in Hoboken
 
Bartender
Posts: 1210
25
Android Python PHP C++ Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse, by default, uses its own ant package that's bundled as a plugin (..\eclipse\plugins\org.apache.ant_...), even if ANT_HOME environment variable is set to C:\Program Files\apache-ant-1.8.2
Check which Ant is being used from workspace Preferences > Ant > Runtime.
If you want to use the one in C:\Program Files\apache-ant-1.8.2, select that directory from "Ant home..." button. Since its \lib already contains catalina-ant.jar, it too will be included.

Alternatively, stick with eclipse's bundled ant, and add catalina-ant.jar
- either at workspace preferences level (if all ant build files in workspace require it), or add it to just the build file that requires it
- or at build file level, right click on build file > Ant build... configuration dialog > classpath.
 
Ed Connery
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much! It's very confusing blundering around in a complex tool like Eclipse. I couldn't even find General/Preferences except by clicking on it in the help system, and I couldn't find it at the build level at all (or perhaps I failed to find the build level). The warnings remain in the display of build.xml, but in fact the build worked, the war file deployed, and the application will launch properly. Magic, perhaps?

In any case, thanks again. -- Ed
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic