Maven
Mac OSX
Before OS X Mavericks, Mac OS X comes with Apache Maven 3 built in, and can be located at /usr/share/maven
After the upgrade of Mac OS X Mavericks, Maven was removed and hence needs to be installed manually.
- Download Maven Binary
- Extract the distribution archive, i.e.
apache-maven-<version.number>-bin.tar.gzto the directory you wish to install Maven. These instructions assume you chose `/System/Library/Apache-Maven`. The subdirectory `apache-maven- ` will be created from the archive. - In a command terminal, add the
M2_HOMEenvironment variable, e.g.export M2_HOME=/System/Library/Apache-Maven/apache-maven-<version.number>. - Add the
M2environment variable, e.g.export M2=$M2_HOME/bin. - Add
M2environment variable to your path, e.g.export PATH=$M2:$PATH. - Make sure that
JAVA_HOMEis set to the location of your JDK, e.g.export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdkand that$JAVA_HOME/binis in yourPATHenvironment variable. - Run
mvn --versionto verify that it is correctly installed.
Linux
- Download Maven Binary
- Extract the distribution archive, i.e.
apache-maven-<version.number>-bin.tar.gzto the directory you wish to install Maven. These instructions assume you chose `/usr/local/apache-maven`. The subdirectory `apache-maven- ` will be created from the archive. - In a command terminal, add the
M2_HOMEenvironment variable, e.g.export M2_HOME=/usr/local/apache-maven/apache-maven-<version.number>. - Add the
M2environment variable, e.g.export M2=$M2_HOME/bin. - Add
M2environment variable to your path, e.g.export PATH=$M2:$PATH. - Make sure that
JAVA_HOMEis set to the location of your JDK, e.g.export JAVA_HOME=/usr/java/jdk1.6.0and that$JAVA_HOME/binis in yourPATHenvironment variable. - Run
mvn --versionto verify that it is correctly installed.