Getting-Started with Maven 2 for Ubuntu 16.04 Xenial
Hi! The Tutorial shows you Step-by-Step How to Install and Getting-Started with Apache Maven 2.x on Ubuntu 16.04 Xenial Xerus LTS Linux.
Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.
-
Open Terminal Window
Ctrl+Alt+t on desktop
(Press “Enter” to Execute Commands)In case first see: Terminal QuickStart Guide.
-
Download Apache Maven 2.x Binaries
-
Extracting Maven 2 tar.gz Archive
tar xvzf $HOME/Downloads/apache-maven-2*bin.tar.gz
rm $HOME/Downloads/apache-maven-2*bin.tar.gz
-
Relocating Maven 2 Folder.
Local Installation:
mv $HOME/Downloads/apache-maven-2* $HOME
System Wide Installation:
sudo su -c "chown -R root:root $HOME/Downloads/apache-maven-2*"
sudo su -c "mv $HOME/Downloads/apache-maven-2* /opt/"
-
Edit the User PATH.
To Enable Maven 2 on the System
nano $HOME/.bashrc
Append:
export PATH=/opt/apache-maven-2[x.y.z]:$PATH
Ctrl+x to Save & Exit from nano Editor :)
Loading Setup:bash
-
Testing Maven 2 Installation
which mvn
mvn -v