Installing Maven 3 on Ubuntu 11.04 LTS Server

The instructions below are based on Installing Maven 3 on Ubuntu 10.04 LTS Server from Luke Bourke. I am installing Maven 3.0.3 on Ubuntu 11.04 LTS Server with Oracle Java 6.

Download the Maven 3.0.3 binary distribution from your local mirror:

$ wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/binaries/apache-maven-3.0.3-bin.tar.gz

Uncompress the binary distribution and copy it to the /usr/local directory:

$ tar -zxf apache-maven-3.0.3-bin.tar.gz
$ sudo cp -R apache-maven-3.0.3 /usr/local

Create symbolic link in /usr/bin:

$ sudo ln -s /usr/local/apache-maven-3.0.3/bin/mvn /usr/bin/mvn