In this blog, I would like to demonstrate the Apache-Ant installtion on Ubuntu.
What are the pre-requisites:
You need to have JDK 8/9 in your Ubuntu machine.
If you do not have it please visit my blog to get the installation instructions.
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/
How to uninstall existing ant?:
Step1:
I have ant installed in my ubuntu VM.
1st let me remove it and restart the install process:
We need to use the below command:
sudo apt-get remove ant
===== Screen display =====>
vskumar@ubuntu:~$ sudo apt-get remove ant
[sudo] password for vskumar:
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
ant ant-optional
0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
After this operation, 3,108 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 236912 files and directories currently installed.)
Removing ant-optional (1.9.6-1ubuntu1) …
Removing ant (1.9.6-1ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
========= Ant is Removed ===>
Step2:
=== Checking Ant version ===>
vskumar@ubuntu:~$ ant -v
The program ‘ant’ is currently not installed. You can install it by typing:
sudo apt install ant
vskumar@ubuntu:~$ D
===Now there is no Ant setup ===>
Looks like; still the ant is existing.
Step3:
Also please let us note the following:
If we want to delete configuration and/or data files of ant from Ubuntu Xenial completely,
then the below command will work:
sudo apt-get purge ant
== Screen display ===>
vskumar@ubuntu:~$ sudo apt-get purge ant
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
ant* ant-optional*
0 upgraded, 0 newly installed, 2 to remove and 4 not upgraded.
After this operation, 3,108 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 236912 files and directories currently installed.)
Removing ant-optional (1.9.6-1ubuntu1) …
Removing ant (1.9.6-1ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
vskumar@ubuntu:~$
======================>
Now, let us check it.
=== Check the version now also ===>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ ant -v
bash: /usr/bin/ant: No such file or directory
vskumar@ubuntu:~$
=================================>
Still you if you feel ant older version is there, we can follow the below step also:
To delete configuration and/or data files of ant and it’s dependencies from Ubuntu Xenial
then we should execute the below command:
sudo apt-get purge –auto-remove ant
Now, we will see how to install, configure and compile ant latest version1.10.1 ?:
Step1:
We need to update the packages/repos in Ubuntu VM as below:
sudo apt-get update
==== Screen display ======>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo apt-get update
[sudo] password for vskumar:
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/ansible/ansible/ubuntu xenial InRelease
Hit:3 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
Get:4 https://download.docker.com/linux/ubuntu xenial InRelease [65.8 kB]
Ign:5 https://apt.datadoghq.com stable InRelease
Get:6 https://apt.datadoghq.com stable Release [4,525 B]
Get:7 https://apt.datadoghq.com stable Release.gpg [819 B]
Ign:8 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial InRelease
Ign:9 https://pkg.jenkins.io/debian-stable binary/ InRelease
Ign:10 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial InRelease
Get:11 https://pkg.jenkins.io/debian-stable binary/ Release [2,042 B]
Get:12 https://pkg.jenkins.io/debian-stable binary/ Release.gpg [181 B]
Ign:13 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial Release
Ign:14 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial Release
Get:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages [4,793 B]
Ign:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Get:23 https://apt.datadoghq.com stable/6 amd64 Packages [2,447 B]
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Get:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages [4,521 B]
Ign:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Get:15 https://download.docker.com/linux/ubuntu xenial/edge amd64 Packages [29.9 kB]
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Get:29 https://pkg.jenkins.io/debian-stable binary/ Packages [12.7 kB]
Ign:29 https://pkg.jenkins.io/debian-stable binary/ Packages
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Get:29 https://pkg.jenkins.io/debian-stable binary/ Packages [11.9 kB]
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Ign:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Err:16 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 Packages
403 Forbidden
Ign:17 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 all Packages
Ign:18 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en_US
Ign:19 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 Translation-en
Ign:20 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:21 https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Err:22 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 Packages
403 Forbidden
Ign:24 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 all Packages
Ign:25 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en_US
Ign:26 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 Translation-en
Ign:27 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 amd64 DEP-11 Metadata
Ign:28 https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial/test-17.06 DEP-11 64×64 Icons
Fetched 118 kB in 35s (3,328 B/s)
Reading package lists… Done
W: The repository ‘https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu xenial Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: The repository ‘https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu xenial Release’ does not have a Release file.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch https://storebits.docker.com/ee/ubuntu/<subscription-id>/ubuntu/dists/xenial/test-17.06/binary-amd64/Packages 403 Forbidden
E: Failed to fetch https://storebits.docker.com/ee/ubuntu/vskumardocker/ubuntu/dists/xenial/test-17.06/binary-amd64/Packages 403 Forbidden
E: Some index files failed to download. They have been ignored, or old ones used instead.
vskumar@ubuntu:~$
====================================>
Step2:
Now, We can get the install file of ant with the below command:
sudo apt-get install ant
==== Screen Display =====>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo apt-get install ant
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
ant-optional
Suggested packages:
ant-doc ant-gcj default-jdk | java-compiler | java-sdk ant-optional-gcj
antlr javacc jython libbcel-java libbsf-java libgnumail-java libjdepend-java
liboro-java libregexp-java
The following NEW packages will be installed:
ant ant-optional
0 upgraded, 2 newly installed, 0 to remove and 4 not upgraded.
Need to get 0 B/2,205 kB of archives.
After this operation, 3,108 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package ant.
(Reading database … 236678 files and directories currently installed.)
Preparing to unpack …/ant_1.9.6-1ubuntu1_all.deb …
Unpacking ant (1.9.6-1ubuntu1) …
Selecting previously unselected package ant-optional.
Preparing to unpack …/ant-optional_1.9.6-1ubuntu1_all.deb …
Unpacking ant-optional (1.9.6-1ubuntu1) …
Processing triggers for man-db (2.7.5-1) …
Setting up ant (1.9.6-1ubuntu1) …
Setting up ant-optional (1.9.6-1ubuntu1) …
vskumar@ubuntu:~$
==========================>
Step3:
Now let me check its version.
===== Version check ===>
vskumar@ubuntu:~$ ant -v
Apache Ant(TM) version 1.9.6 compiled on July 8 2015
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
vskumar@ubuntu:~$
====================>
Step4:
We need to Install Apache Ant on Ubuntu 16.04 using SDKMan.
SDKMAN is a tool which can be usd to manage parallel versions of multiple
Software Development Kits on most Unix based systems.
The same way, we can leverage SDKMAN to install Apache Ant on Ubuntu 16.04.
Using the below command:
sdk install ant
Before doing this I need to install SDK in my ubuntu VM.
===== Screen display =====>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ curl -s “https://get.sdkman.io” | bash
-+syyyyyyys:
`/yho:` -yd.
`/yh/` +m.
.oho. hy .`
.sh/` :N` `-/o` `+dyyo:.
.yh:` `M- `-/osysoym :hs` `-+sys: hhyssssssssy+
.sh:` `N: ms/-“ yy.yh- -hy. `.N-““““+N.
`od/` `N- -/oM- ddd+` `sd: hNNm -N:
:do` .M. dMMM- `ms. /d+` `NMMs `do
.yy- :N` “`mMMM. – -hy. /MMM: yh
`+d+` `:/oo/` `-/osyh/ossssssdNMM` .sh: yMMN` /m.
-dh- :ymNMMMMy `-/shmNm-`:N/-.“ `.sN /N- `NMMy .m/
`oNs` -hysosmMMMMydmNmds+-.:ohm : sd` :MMM/ yy
.hN+ /d: -MMMmhs/-.` .MMMh .ss+- `yy` sMMN` :N.
:mN/ `N/ `o/-` :MMMo +MMMN- .` `ds mMMh do
/NN/ `N+….–:/+oooosooo+:sMMM: hMMMM: `my .m+ -MMM+ :N.
/NMo -+ooooo+/:-….`…:+hNMN. `NMMMd` .MM/ -m: oMMN. hs
-NMd` :mm -MMMm- .s/ -MMm. /m- mMMd -N.
`mMM/ .- /MMh. -dMo -MMMy od. .MMMs..—yh
+MMM. sNo`.sNMM+ :MMMM/ sh`+MMMNmNm+++-
mMMM- /–ohmMMM+ :MMMMm. `hyymmmdddo
MMMMh. ““ `-+yy/`yMMM/ :MMMMMy -sm:.“..-:-.`
dMMMMmo-.“““..-:/osyhddddho. `+shdh+. hMMM: :MmMMMM/ ./yy/` `:sys+/+sh/
.dMMMMMMmdddddmmNMMMNNNNNMMMMMs sNdo- dMMM- `-/yd/MMMMm-:sy+. :hs- /N`
`/ymNNNNNNNmmdys+/::—-/dMMm: +m- mMMM+ohmo/.` sMMMMdo- .om: `sh
`.—–+/.` `.-+hh/` `od. NMMNmds/ `mmy:` +mMy `:yy.
/moyso+//+ossso:. .yy` `dy+:` .. :MMMN+—/oys:
/+m: `.-:::-` /d+ +MMMMMMMNh:`
+MN/ -yh. `+hddhy+.
/MM+ .sh:
:NMo -sh/
-NMs `/yy:
.NMy `:sh+.
`mMm` ./yds-
`dMMMmyo:-.““.-:oymNy:`
+NMMMMMMMMMMMMMMMMms:`
-+shmNMMMNmdy+:`
Now attempting installation…
Looking for a previous installation of SDKMAN…
Looking for unzip…
Looking for zip…
Looking for curl…
Looking for sed…
Installing SDKMAN scripts…
Create distribution directories…
Getting available candidates…
Prime the config file…
Download script archive…
######################################################################## 100.0%
Extract script archive…
Install scripts…
Set version to 5.6.3+299 …
Attempt update of interactive bash profile on regular UNIX…
Added sdkman init snippet to /home/vskumar/.bashrc
Attempt update of zsh profile…
Updated existing /home/vskumar/.zshrc
All done!
Please open a new terminal, or run the following in the existing one:
source “/home/vskumar/.sdkman/bin/sdkman-init.sh”
Then issue the following command:
sdk help
Enjoy!!!
vskumar@ubuntu:~$
== SDK installed =====>
We need to use the below command:
=====>
vskumar@ubuntu:~$ source “$HOME/.sdkman/bin/sdkman-init.sh”
vskumar@ubuntu:~$
======>
Now, let us check SDK Version.
===== SDK Version checking ====>
vskumar@ubuntu:~$ sdk version
==== BROADCAST =================================================================
* 09/05/18: sbt 1.1.5 released on SDKMAN! #scala
* 09/05/18: Springboot 2.0.2.RELEASE released on SDKMAN! #springboot
* 09/05/18: Springboot 1.5.13.RELEASE released on SDKMAN! #springboot
================================================================================
SDKMAN 5.6.3+299
vskumar@ubuntu:~$
==========================>
Step5:
Now, let us use the below command:
sdk install ant
=== Screen display ==>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sdk install ant
Downloading: ant 1.10.1
In progress…
######################################################################## 100.0%
Installing: ant 1.10.1
Done installing!
Setting ant 1.10.1 as default.
vskumar@ubuntu:~$
vskumar@ubuntu:~$
=================>
Step6:
Now, let us check the ant’s latest version:
== Screen display ===>
vskumar@ubuntu:~$ ant -v
Apache Ant(TM) version 1.10.1 compiled on February 2 2017
Trying the default build file: build.xml
Buildfile: build.xml does not exist!
Build failed
vskumar@ubuntu:~$
== Now version change you can see after SDK usage ===>
Step7:
How to Create ANT_HOME Environment Variables?:
Create an ant.sh file at /etc/profile.d folder (you can use vi with below command)
== Let us see the files===>
vskumar@ubuntu:~$ pwd
/home/vskumar
vskumar@ubuntu:~$ ls /etc/profile.d
appmenu-qt5.sh bash_completion.sh vte-2.91.sh
apps-bin-path.sh cedilla-portuguese.sh
vskumar@ubuntu:~$
==========================>
There is no ant.sh file.
sudo vi /etc/profile.d/ant.sh
Enter the follow content to the file:
export ANT_HOME=/usr/local/ant
export PATH=${ANT_HOME}/bin:${PATH}
Save the file.
====== ant.sh file creation ===>
vskumar@ubuntu:~$ sudo vim /etc/profile.d/ant.sh
vskumar@ubuntu:~$
vskumar@ubuntu:~$ sudo cat /etc/profile.d/ant.sh
export ANT_HOME=/usr/local/ant
export PATH=${ANT_HOME}/bin:${PATH}
vskumar@ubuntu:~$
vskumar@ubuntu:~$ ls /etc/profile.d
ant.sh apps-bin-path.sh cedilla-portuguese.sh
appmenu-qt5.sh bash_completion.sh vte-2.91.sh
vskumar@ubuntu:~$
============ Contents of ant.sh=====>
Step8:
We need to activate the above environment variables.
We can do that by log out and log in again or simply run below command:
source /etc/profile
==== Screen display ===>
vskumar@ubuntu:~$ source /etc/profile
vskumar@ubuntu:~$
=======================>
Now let us check the ant version after doing the above steps to observe the change:
==== Display ==>
vskumar@ubuntu:~$
vskumar@ubuntu:~$ ant -version
Apache Ant(TM) version 1.10.1 compiled on February 2 2017
vskumar@ubuntu:~$
== Now error now =====>
Finally, we have configured Apache Ant(TM) version 1.10.1 and compiled successfully.
For Ant installation on windows 10 visit my blog:
https://vskumar.blog/2018/05/12/24-devops-how-to-install-apache-ant-for-windows-10/