I am upgrading from 2.4 to 3.3.3

Pre-requisite: JDK 1.5 or above,

JAVA_HOME set in environment variable

Step 1) Download Maven-3.3.3 binary from a repository using the wget command.

wget http://mirrors.sonic.net/apache/maven/maven-3/3.3.3/binaries/apache-maven-3.3.3-bin.tar.gz

Step 2) Untar the downloaded binary.

tar -zxf apache-maven-3.3.3-bin.tar.gz

Step 3) Move the application directory to /usr/local

sudo cp -R apache-maven-3.3.3 /usr/local

Step 4) Make a symlink in /usr/bin for universal access of mvn

sudo ln -s /usr/local/apache-maven-3.3.3/bin/mvn /usr/bin/mvn

Now verify mvn installation

mvn -v

Output from my terminal

Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T17:27:37+05:30)
Maven home: /usr/local/apache-maven-3.3.3
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: “linux”, version: “3.13.0-62-generic”, arch: “amd64”, family: “unix”

Leave a Reply

Your email address will not be published. Required fields are marked *