Ant is a favorite build tool for most of front-end developers &
is an excellent choice for JavaScript also. Ant install is like a breeze
on MAC but is a bit tricky on Windows. The instructions below are only
for Windows 7.
- Make sure JDK is installed already from http://bit.ly/V7yv7Z. For my purpose I have used x86 version instructions would also be on the same lines.
- Download the .zip for the binaries from http://ant.apache.org/bindownload.cgi.
- Extract the binaries on the path C:java\ant\ where [java] and [ant] would be self created folders you can store in any directory structure of your preference.
- Set up Environment variables with the names JAVA_HOME & ANT_HOME.
- To set up the variables › Right Click My Computer › Click Properties › Click Advanced system settings › Click Environment Variables › Click New System Variable.
- For ant variable name would be ANT_HOME and value would be c:\java\ant\.
- For JDK depending on the version and platform i.e. x86 the path would be c:\Program Files (x86)\Java\jdk1.7.0_09. The version 1.7.0_09 might only differ if you have installed the x86 platform base of JDK in the default location seleted by JDK installer.
- Open Command Prompt & from there go to c:\java\ant\bin and type command ant and you should get the message Buildfile: build.xml does not exist!
Build Failed! - This means ant is installed properly and looking for build.xml
- If you want to be able to run ant command from anywhere while inside Command prompt need to add your ant path in my case which is C:\java\ant\bin to Path environment variable there will be other paths also there each separated by semi-colon(;).