Install Maven 3 Ubuntu
Since this seems like a lot of manual busywork, here’s a custom DEB package. To install it, just execute the following commands on Ubuntu 10.04 (or 10.10):
sudo add-apt-repository "deb http://build.discursive.com/apt/ lucid main"
sudo apt-get update
sudo apt-get install maven
This package depends on the java6-sdk, and by default it will install the OpenJDK 6 JDK. If you want to use the Sun JDK, you will need to add the “http://archive.canonical.com/ lucid partner” repository. Once the package is installed, log out and log in again. This package just drops Maven into /usr/local/, creates a symbolic link, and then creates a file in /etc/profile.d/maven.sh that sets M2_HOME and PATH.