In this tutorials, I am going to show you how to install Maven on Ubuntu 14.x.
Maven on Ubuntu 14.x :
Unlike installing the maven on windows versions, it is not necessary to download the maven zip from external resources. We can easily install the maven using basic linux commands.
Steps to install Maven on Ubuntu :
Follow the below steps.
Step – 1 :
Open the terminal by passing the below command :
Step – 2 :
Search for Maven packages on your machaine by passing the below command :
apt-cache search maven
Probably you can see the below text on your end of the terminal.
maven – Java software project management and comprehension tool
maven-ant-helper – helper scripts for building Maven components with ant
maven-debian-helper – Helper tools for building Debian packages with Maven
maven-repo-helper – Helper tools for including Maven metadata in Debian packages
testng – testing framework for Java
Install the latest maven on ubuntu by passing the below command your terminal.
sudo apt-get install maven
It will ask your sudo password and then ask to confirm the continuation. After confirming it will take few minutes to download and setting up.
After completion of above step, we can test it by knowing the maven version. To get the maven version you can pass the below command.
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_121, 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.4.0-71-generic”, arch: “amd64”, family: “unix”
If you see the above information you can confirm that, maven has successfully installed on your ubuntu machine.
Happy Learning 🙂