Site-wide Tags:  Linux(17) | CommandLine(12) | Ubuntu(10) | RemoteAccess(7) | Tools(7) | Vim(7) | LiftWeb(5) | SBT(5) | SoftwareDev(5) | Mac(5) | Scripts(4) | WebDev(4) | Diagrams(4) | Lifty(3) | NetworkDrives(3) | Processwire(3) | Security(3) | Fog(3) | VCS(3) | BestPractices(3) | RaspberryPi(2) | WebDesign(2) | Encryption(2) | Windows(2) | SSH(2) | WinCommandPrompt(2) | GitHubRepos(2) | Emacs(2) | PHP(2) | IDE(2) | ErrorMsgs(2) | JVM(2) | Hardware(2) | Bash(2) | Networks(2) | Graphviz(2) | Cloning | Cygwin | Graphics | Java | SystemRecovery | lessc | Maven | Python | PXE | Samba | LXDE | PackageManagement | LifeHacks | LESS |

This site has been archived and will no longer be updated.
You can find my new profile at neilpahl.com. My new blog is at 808.ninja.

Entry 1: Installing Maven 3 on Ubuntu 10.04

Topic: Maven   

Tags:  JVM   Linux   Maven   Ubuntu   

Created on Tue, 01 May 2012.
Last Modified on Tue, 08 Jan 2013.

Since Ubuntu 10.04 has only maven2 in the apt-get repositories, maven 3 must be downloaded, extracted and added to the $PATH environment variable.

First, download the the binaries from the maven download page. I would give the download link, but they ask that you download from the nearest mirror (I'm in Hong Kong, and downloaded binaries for Maven 3.0.4) . So, copy the download link for your nearest mirror and then use:

wget http://link/to/download/maven_binaries.tar.gz

unzip them,

tar xzf maven_binaries.tar.gz

move the files to /usr/local (the recommended place to place non-package managed linux installs)

sudo cp maven_binaries /usr/local/apache-maven

then add some evirontment variables to /etc/environment:

JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
M3_HOME="/usr/local/apache-maven"
MAVEN_HOME="/usr/local/apache-maven"
M3="/usr/local/apache-maven/bin"

append the maven binaries to $PATH by changing your PATH from :

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"

to:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/apache-maven/bin/"


afterwards, run the following to test:

mvn --version

you should get something like:

Apache Maven 3.0.4 (r1232337; 2012-01-17 16:44:56+0800)
Maven home: /usr/local/apache-maven
Java version: 1.6.0_20, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_HK, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-40-generic-pae", arch: "i386", family: "unix"


PLEASE let me know if I'm doing something wrong, or if you have any suggestions or requests~

blog comments powered by Disqus

All Entries Within This Topic:

  • 1: Installing Maven 3 on Ubuntu 10.04

Subscribe to this topic:

Browse Topics: