Osx-maven

From John Freier
Jump to: navigation, search

Installing

Most of these steps were taken right off the maven web page under Unix-based operating systems.

1. Download Maven - http://maven.apache.org/download.cgi

2. Extract the distribution archive, i.e. apache-maven-3.2.5-bin.tar.gz to the directory you wish to install Maven 3.2.5. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.2.5 will be created from the archive.

3. In a command terminal, add the M2_HOME environment variable, e.g. export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.5.

4. Add the M2 environment variable, e.g. export M2=$M2_HOME/bin.

5. Add M2 environment variable to your path, e.g. export PATH=$M2:$PATH.

OSX Java 6 Problem

There is an issue with java 6 and not finding the tools.jar file.

Add symbolic links:

 ln -s /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../Classes/classes.jar /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../Classes/tools.jar
 ln -s /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../Classes /Library/Java/JavaVirtualMachines/1.6.0_38-b04-436.jdk/Contents/Home/../lib