How to install maven on Ubuntu 16.04 (Xenial Xerus)




Install-Maven-on-Ubuntu-16.04

In this tutorial we will see how to install Apache Maven on Ubuntu 16.04 (Xenial Xerus).

Step 1. 

Please Make sure that JAVA_HOME environment variable is set and points to your JDK installation in your system.

So to install Java 8 Open the terminal and run the following command

$ sudo add-apt-repository ppa:webupd8team/java -y
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

Step 2.  Now we will install maven 

Install Maven-3

$ cd ~/Downloads/ 
$ wget http://apache.mirror.digitalpacific.com.au/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
$ cd /opt/ && sudo tar -xzvf ~/Downloads/apache-maven-3.3.9-bin.tar.gz
$ sudo update-alternatives --install /usr/bin/mvn maven /opt/apache-maven-3.3.9/bin/mvn 1001

Step 3 . verify if maven is installed

To verify maven  run the following command

$ mvn -v

or

$ mvn --version;

Output

Apache Maven 3.0.5 (...)
Maven home: ...
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: ...
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

 
Now Apache Maven is installed successfully on your Ubuntu 16.04 (Xenial Xerus).


Partner Sites

VideoToGifs.com

EasyOnlineConverter.com

SqliteTutorials.com





Be the first to comment

Leave a Reply

Your email address will not be published.


*