Install Latest Maven 3
When you try to install maven using apt-get it will not install the latest release. Even after adding maven3 ppa, apt-get couldnt find it. Easiest solution for this was to download the binary and give the path. I thought it could be useful to beginners.
Go to link
https://maven.apache.org/download.cgi
and download the latest build for maven. Now it is 3.3.9
sudo mkdir -p /usr/local/apache-maven
copy the downloaded file to the location
sudo cp ~/Downloads/apache-maven-3.3.9-bin.tar.gz /usr/local/apache-maven
Next go to the location of the copied folder and untar the package
cd /usr/local/apache-maven sudo tar -xzvf apache-maven-3.3.9-bin.tar.gz
Then add these line to the profile of bash using vim or any editor
vim ~/.profile
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 reload the profile changes
source ~/.profile
Then type the version and see
mvn -v
Done