How To Install Apache Ant on Linux mint 18.03

To Install Apache Ant on Linux mint 18.03

Apache Ant is a Java-based build tool that was developed by Apache Software Foundation, which is used to build files that are written in XML. Apache Ant is a java library and command line tool so it is required to install Java Development Kit (JDK). This tutorial explains the installation procedure of Apache Ant on Linuxmint-18.03.

Prerequisites

Install Java.

java installation with required following modules
add-apt-repository ppa:webupd8team/java
apt update
apt install oracle-java8-installer

Installation

Let's first start with updating the system repositories

linuxhelp ~ # apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial InRelease                                               
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease                               
Ign:5 http://packages.linuxmint.com sylvia InRelease                                           
Get:6 http://archive.ubuntu.com/ubuntu xenial-updates InRelease \[109 kB\]
Hit:7 http://packages.linuxmint.com sylvia Release                             
Get:9 http://security.ubuntu.com/ubuntu xenial-security InRelease \[107 kB\]          
Get:10 http://archive.ubuntu.com/ubuntu xenial-backports InRelease \[107 kB\]        
Fetched 323 kB in 1s (215 kB/s)     
Reading package lists... Done

Install the apache ant application run the following command.

linuxhelp ~ # apt-get install ant
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  ant-doc ant-gcj
Recommended packages:
  ant-optional
The following NEW packages will be installed:
  ant
0 upgraded, 1 newly installed, 0 to remove and 448 not upgraded.
Need to get 1,899 kB of archives.
After this operation, 2,185 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 ant all 1.9.6-1ubuntu1.1 \[1,899 kB\]
Fetched 1,899 kB in 4s (383 kB/s)
Selecting previously unselected package ant.
(Reading database ... 227325 files and directories currently installed.)
Preparing to unpack .../ant\_1.9.6-1ubuntu1.1\_all.deb ...
Unpacking ant (1.9.6-1ubuntu1.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ant (1.9.6-1ubuntu1.1) ...

Verify the version of apache ant

linuxhelp ~ # ant -version 
Apache Ant(TM) version 1.9.6 compiled on July 20 2018

With this, the method to install Apache Ant on Linux mint-18.03 comes to an end.

Tag : apache ant
FAQ
Q
What is Ant in selenium?
A
Ant is a build tool for Java. Ant used for code compilation, deployment, execution process. Ant can be downloaded from Apache website. Build.xml file used to configure execution targets using Ant. Ant can be run from the command line or suitable IDE plugin like eclipse.
Q
What is Ant target?
A
A target is a container of tasks that cooperate to reach a desired state during the build process. Targets can depend on other targets and Apache Ant ensures that these other targets have been executed before the current target.
Q
What is an Ant build?
A
Ant is a Java-based build tool created as part of the Apache open-source project. You can think of it as a Java version of make. Ant scripts have a structure and are written in XML. Similar to make, Ant targets can depend on other targets
Q
Why Ant build tool is used?
A
A build tool is used to automate repetitive tasks during this process. This can be, for example, compiling source code, running software tests and creating files and documentation for the software deployment. ... Popular build tools in the Java space are Maven, Gradle and Apache Ant.
Q
What is Apache Ant used for?
A
Apache Ant is a Java library and command-line tool whose mission is to drive processes described in build files as targets and extension points dependent upon each other. ... Ant can also be used effectively to build non-Java applications, for instance, C or C++ applications.