Install Maven 3.0.3

Our EMS project already change to use Maven 3.0.3  .  But the problem thing is other project still using Maven 2 ... However the good new is Maven 3.0.3 is compatible for Maven 2 project.

It's quite easy to install it on Windows and Ubuntu. Take Ubuntu for example, just run following commands :

Install Maven 3.0.3 in Ubuntu 10.10

$ wget http://ftp.heanet.ie/mirrors/www.apache.org/dist/maven/binaries/apache-maven-3.0.3-bin.tar.gz
$ tar -zvxf apache-maven-3.0.3-bin.tar.gz
$ sudo cp -R apache-maven-3.0.3 /usr/local
$ sudo ln -s /usr/local/apache-maven-3.0.3/bin/mvn /usr/bin/mvn

However, if you still have to use Maven 2 and 3 together, in Windows , you can create following bat files:

Mave2.bat

@ECHO off
set M2_HOME=C:\Program Files\Apache\apache-maven-2.2.1
set org_path=%PATH%
path %PATH%;%M2_HOME%\bin
call mvn %*
path %org_path%

Mave3.bat

@ECHO off
set M2_HOME=C:\Program Files\Apache\apache-maven-3.0.3
set org_path=%PATH%
path %PATH%;%M2_HOME%\bin
call mvn %*
path %org_path%