aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Classpath for Ant program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Classpath for Ant program" Watch "Classpath for Ant program" New topic
Author

Classpath for Ant program

Tore Sagen
Greenhorn

Joined: Apr 23, 2004
Posts: 18
I have this basic build.xml:


The classes are packed into catalina-ant5.jar and placed in /usr/share/ant/lib. I thought Ant should load the classes automatically, but it doesn't. Invoking Ant gives me this:



The following command doesn't help either, specifying the classpath in detail:


I could use some help, please.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Did you take a look at whether the jar file actually contains that class?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tore Sagen
Greenhorn

Joined: Apr 23, 2004
Posts: 18
Yes, I have. The result is listed below.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16236
    
  21

Don't confuse the classpath for Ant itself with the classpath for the taskdef. You probably need to add a classpath definition to the task. For some tasks, I've actually had to do 2 classpaths - one for the taskdef itself and one for the defined task's execution.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
Consider Paul's rocket mass heater.
 
subject: Classpath for Ant program