File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes Self Inflicted Pain With antcontrib Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Self Inflicted Pain With antcontrib" Watch "Self Inflicted Pain With antcontrib" New topic

Self Inflicted Pain With antcontrib

Dennis Putnam
Ranch Hand

Joined: Feb 03, 2012
Posts: 230
I apparently have screwed myself and I don't know what to do. I had a working ant environment (CentOS) when I attempted to install Java version 7. I removed version 6 using 'yum' and much to my surprise it also removed ant. After installing version 7 from an RPM, ant was not installed. I then tried to install ant with yum and it reinstalled Java version 6. At that point I decided to forget version 7 until it is available via yum. However, I can no longer do my builds as I get this error:

Could not load definitions from resource net/sf/antcontrib/ It could not be found.

I have no idea why this happens as the directory pointed to by the build file:

does contain the library:

#ls /var/www/html/Applets/ant-contrib
ant-contrib-1.0b3.jar docs lib

Which was untouched by this fiasco. Can someone point me to some other cause? TIA.
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32819

The pathelement is supposed to contain the actual jar file name, not a directory. Try this instead:

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Peter Johnson

Joined: May 14, 2008
Posts: 5852

I know this doesn't solve the immediate issue, but things like this are why I always install Java components manually from their download sites and never use the Linux package manager to install anything Java.

JBoss In Action
jQuery in Action, 3rd edition
subject: Self Inflicted Pain With antcontrib
It's not a secret anymore!