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.gz
to 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_HOME
environment variable, e.g.export M2_HOME=/System/Library/Apache-Maven/apache-maven-<version.number>
. - Add the
M2
environment variable, e.g.export M2=$M2_HOME/bin
. - Add
M2
environment variable to your path, e.g.export PATH=$M2:$PATH
. - Make sure that
JAVA_HOME
is set to the location of your JDK, e.g.export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk
and that$JAVA_HOME/bin
is in yourPATH
environment variable. - Run
mvn --version
to verify that it is correctly installed.
Linux
- Download Maven Binary
- Extract the distribution archive, i.e.
apache-maven-<version.number>-bin.tar.gz
to 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_HOME
environment variable, e.g.export M2_HOME=/usr/local/apache-maven/apache-maven-<version.number>
. - Add the
M2
environment variable, e.g.export M2=$M2_HOME/bin
. - Add
M2
environment variable to your path, e.g.export PATH=$M2:$PATH
. - Make sure that
JAVA_HOME
is set to the location of your JDK, e.g.export JAVA_HOME=/usr/java/jdk1.6.0
and that$JAVA_HOME/bin
is in yourPATH
environment variable. - Run
mvn --version
to verify that it is correctly installed.