Tuesday, April 30, 2013

Installing Maven 3.0 on Ubuntu 12.04/12.10/13.04

Prerequisite:- JDK 1.5 or above, JAVA_HOME set in environment variable.

Here are the steps to install Maven 3.0.4 on Ubuntu 12.04/12.10/13.04


Download Apache Maven 3.0.4 binary from repository using the following command
wget http://archive.apache.org/dist/maven/binaries/apache-maven-3.0.4-bin.tar.gz

Unzip the binary with tar
tar -zxf apache-maven-3.0.4-bin.tar.gz

Move the application directory to /usr/local
sudo cp -R apache-maven-3.0.4 /usr/local


Make a soft link in /usr/bin for universal access of mvn
sudo ln -s /usr/local/apache-maven-3.0.4/bin/mvn /usr/bin/mvn


Verifify mvn installation
mvn –version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 19:21:28+0530)
Maven home: /usr/local/apache-maven-3.0.5
Java version: 1.6.0_32, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/jdk1.6.0_32/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-40-generic-pae", arch: "i386", family: "unix"

1 comment: