Install the latest Maven 3 on Ubuntu 12.04 - lifuzu/cafe GitHub Wiki
- Java installation - refer to: Install the latest Oracle JDK on Ubuntu
- Download the latest Maven package:
http://mirror.nexcess.net/apache/maven/maven-3/3.1.0/binaries/apache-maven-3.1.0-bin.tar.gz
- Run the following command to install it:
cd /usr/local; sudo tar -zxf ~/Downloads/apache-maven-3*.gz; \
sudo ln -s /usr/local/apache-maven-3* /usr/local/maven
- Append PATH in ~/.bashrc and run it:
export M2_HOME=/usr/local/maven
export PATH=${M2_HOME}/bin:$PATH
- Activate the change:
source ~/.bashrc
- Verification:
mvn -version