How to Install Apache Maven on Ubuntu 18.04
To Install Apache Maven on Ubuntu 18.04
Apache Maven is a free and open source Project Management tool which can be used for Java projects. It provides a framework to automate the project’s build infrastructure. This tutorial explains the installation of Apache Maven on Linux mint-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
Apache JMeter requires java to be pre-installed on the machine so, before you install apache jmeter make sure you have java installed on your machine and you can verify that by using the following command.
root@linuxhelp1:~# java -version
java version "1.8.0\_181"
Java(TM) SE Runtime Environment (build 1.8.0\_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
Let's first start with updating the system repositories
root@linuxhelp1:~# apt-get update
Hit:1 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
Hit:2 http://archive.canonical.com/ubuntu bionic InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Install the apache maven application run the following command.
root@linuxhelp1:~# apt-get install maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libaopalliance-java libapache-pom-java libatinject-jsr330-api-java libcdi-api-java
libcommons-cli-java libcommons-io-java libcommons-lang3-java libcommons-parent-java
libgeronimo-annotation-1.3-spec-java libgeronimo-interceptor-3.0-spec-java libguava-java
.
.
.
Setting up libsisu-inject-java (0.3.2-2) ...
Setting up libsisu-plexus-java (0.3.3-3) ...
Setting up libmaven3-core-java (3.5.2-2) ...
Setting up maven (3.5.2-2) ...
update-alternatives: using /usr/share/maven/bin/mvn to provide /usr/bin/mvn (mvn) in auto mode
verify the apache maven version.
root@linuxhelp1:~# mvn -V Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 1.8.0\_181, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en\_IN, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-23-generic", arch: "amd64", family: "unix"
With this, the method to install Apache Maven on Ubuntu-18.04 comes to an end.
Q
Which language is used to build apache maven?
A
The JAVA language has been used to build the Apache Maven.
Q
What for you have created /etc/profile.d/mavenenv.sh?
A
To setup Environment Variables for Apache Maven.
Q
What is Apache Maven?
A
Apache Maven is free and open source Project Management tool which can be used for Java projects.
Q
What is the essential purpose of using this Apache maven?
A
Maven is a build automation tool used primarily for Java projects
" Cmake, Gradle, Ant, Scons, GNU Make, Rake"