• 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 does not work, keep getting Can't find configuration file

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,
Could someone please help? I keep getting Can't find configuration file, aborting when trying to run ant command.
This is a Redhat linux enterprise server. The ant release is pretty old.
How can I force to install the latest ant release?

Here snapshot of the error:

root:[/] $ uname -a
Linux 2.6.18-274.17.1.el5 #1 SMP Wed Jan 4 22:45:44 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
root:[/] $ yum install ant
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating Red Hat repositories.
rhel-source | 1.2 kB 00:00
rhel-x86_64-server-5 | 1.4 kB 00:00
Setting up Install Process
Package ant-1.6.5-2jpp.2.x86_64 already installed and latest version
Nothing to do
root:[/] $ ant
Can't find configuration file, aborting
root:[/] $ ant --version
Can't find configuration file, aborting
root:[/] $ ant
Can't find configuration file, aborting
root:[/] $ ant help
Can't find configuration file, aborting
root:[/] $ ant ?
Can't find configuration file, aborting
root:[/] $ ant -diagnostic
Can't find configuration file, aborting
root:[/] $

Thanks,

 
Sheriff
Posts: 3063
12
Mac IntelliJ IDE Python VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Peter, welcome to JavaRanch!

It looks like your problem is with yum, not with ant. I can't help you with that, but if you absolutely can't get it working, you can always go "old school". Download the version of ant you want directly from Apache and extract it somewhere into your drive. I always like putting it into /opt, so I'd have /opt/ant/ant-1.8.4 for example. You then need to set the environment variable ANT_HOME and alter PATH to contain ANT_HOME/bin (and make sure that comes before any path entries that may pick up different versions of ant). Done!

I usually make an /opt/ant/default symbolic link to /opt/ant/ant-1.8.4, and set that to be my ANT_HOME. That makes it really easy to change versions. You just change the symbolic link.
 
Peter Flori
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, that helps
reply
    Bookmark Topic Watch Topic
  • New Topic