Monday, September 19, 2016

Install Maven 3.3.9 on ubuntu

The following commands needs to be adapted based on the version of Maven you want to install , the latest version can be found on Maven download page .

This article assumes that you are installing on Ubuntu the version 3.3.9 of maven ( currently latest version as am writing entry ):

wget http://apache.mirrors.lucidnetworks.net/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz

sudo mkdir -p /usr/local/apache-maven

sudo mv apache-maven-3.3.9-bin.tar.gz /usr/local/apache-maven

cd /usr/local/apache-maven

sudo tar -xzvf apache-maven-3.3.9-bin.tar.gz

Once this is done add to you environment variables by editing .bashrc:

nano ~/.bashrc

export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
export M2=$M2_HOME/bin
export MAVEN_OPTS="-Xms256m -Xmx512m"
export PATH=$M2:$PATH

then apply it by executing :
. ~/.bashrc













No comments: