jQuery in Action, 2nd edition*
The moose likes Ant, Maven and Other Build Tools and the fly likes Error with ANT bin directory 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 "Error with ANT bin directory" Watch "Error with ANT bin directory" New topic
Author

Error with ANT bin directory

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hello,

I'm trying to install ANT, have downloaded src zip file 1.8.2.

I'm facing problem with the below instructions :
To run Ant, you can use the %ANT_HOME% variable like so to test the installation:


> %ANT_HOME%\bin\ant -version
For more flexibility, you can add the Ant %ANT_HOME%\bin directory to your %PATH% environment variable using the system application, just as you added the %ANT_HOME% variable. This means you can call the ant command from any directory like so:


> ant -version
If these commands do not display the version number of Ant you installed, check the value of %ANT_HOME% and that the %ANT_HOME%\bin\ant file is accessible.


I'm not able to access the ANT file in BIN folder.

ANT_HOME = C:\apache-ant-1.8.2 & PATH contains %ANT_HOME%\bin;

Please advise.



Thanks,
Pramod
Max White
Ranch Hand

Joined: Jun 28, 2008
Posts: 85
You have to set the bin path also,the way one has to set for java.
In the path environment variable add ant bin path.
Hope it works for you.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Exactly where did you install Ant? Also, post the command you are trying and the results/errors that are coming back.


JBoss In Action
pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hi Peter,
I installed ANT Source files from the Apache homepage.
After unzipping into C:\Apache-ant-1.8.2, I run >BUILD in the command prompt (WIN7 OS).
This creates BUILD folder under Apache-ant-1.8.2 i.e. Apache-ant-1.8.2\BUILD, but there is not BIN folder created.

I do get BUILD FAILED at the end of the messages after running BUILD command.

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Download the binary instead of the source, install that, and use it instead.

BTW, do you have junit installed? Without it the build will not complete.
pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 316

Hi Peter,

It has been working fine after I downloaded Binary installation.

Thanks for your advice.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error with ANT bin directory