This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Baffling Ant version error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Baffling Ant version error" Watch "Baffling Ant version error" New topic
Author

Baffling Ant version error

Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Hi,

We are trying to run a custom Ant task we have written. The task requires the selenium-server.jar library to run. However we are noticing something perplexing. Normally, we get this Ant version output ...



However, when we add the selenium-server.jar file to our Ant's lib directory, we get



Does anyone have any idea what's going on or how to troubleshoot this version thing further? - Dave
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
Have you looked inside the selenium-server.jar to see of there are Ant classes hiding? Unlikely, I guess, but worth a check.
Dave Alvarado
Ranch Hand

Joined: Jul 02, 2008
Posts: 436
Within that jar file, there are two packages ...

./org/apache/tools/ant/
./org/hamcrest/generator/qdox/ant

but why is that a concern? Is there a way that I can figure out what classes are conflicting with Ant? - Dave
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
It's a concern because org/apache/tools/ant is the main Ant package. It's also what's in the ant.jar file that's in the Ant lib directory - setting you up for version clashes.

See if you can find the Selenium classes in some other jar file by themselves, or create a new jar file from them that doesn't contain the Ant classes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Baffling Ant version error
 
Similar Threads
Problems with Java Home in VMBox
Determing the version of a jar
Ant generation script
jdk in linux
ERROR in PlasmaCloud.java double displacement = StdRandom.gaussian(0, stddev);