24.DevOps: How to install Apache-Ant for Windows 10 ?

Ant-Logo

With reference to my previous blogs on DevOps CI Tools
installation/integration, in this blog you can learn on how to install ANT for Windows10.

Downloand windows 10 version of APACHE ANT from the below url:

http://redrockdigimark.com/apachemirror//ant/binaries/apache-ant-1.10.3-bin.zip

Assuming you have JDK and JAVA_Hoome are setup in windows variables environment.
If you need to install JDK in your windows machine, please go through my JENKINS
Instllation blog. It has JDK installation procedure also.
URL: https://vskumar.blog/2017/11/25/1-devops-jenkins2-9-installation-with-java-9-on-windows-10/

Unzip the file : apache-ant-1.10.3-bin.zip
Note this path. And go to Windows System variables and use new.
You can type the Variable name : ANT_HOME
Give your Ant software unzipped path, Variable value:
D:\Ant\apache-ant-1.10.3-bin\apache-ant-1.10.3\bin

Note: I gave my ANT path as example.

Goto System variables section and edit/add ANT_HOME variable and
give your current path:
D:\Ant\apache-ant-1.10.3-bin\apache-ant-1.10.3

And the variable can be named as %ANT_HOME%\bin

So you have updated the windows settings for ANT folder Location.

Now, open a fresh CMD window and check the ANT folder as below:
Microsoft Windows [Version 10.0.16299.431]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\Users\Toshiba>echo %ANT_HOME%
D:\Ant\apache-ant-1.10.3-bin\apache-ant-1.10.3\bin

C:\Users\Toshiba>

How to cheeck your current ANT version?:
Now, In a fresh command window,
And apply as below:

C:\Users\Toshiba>echo %ANT_HOME%
D:\Ant\apache-ant-1.10.3-bin\apache-ant-1.10.3

C:\Users\Toshiba>ant -v
Apache Ant(TM) version 1.10.3 compiled on March 24 2018
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed

C:\Users\Toshiba>

Now, it shows your ANT folder and its version also.
It means your ANT software can be used.

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s