installing/configuring maven
- download maven:
- navigate to https://maven.apache.org/download.cgi
- click link for Binary tar.gz archive: apache-maven-3.3.9-bin.tar.gz
- save it to Desktop
- create /usr/local/apache-maven folder:
- on finder, click Go tab
- click Go To Folder…
- type /usr/local - then click Go
- create a folder called apache-maven
- copy the apache-maven-3.3.9-bin.tar.gz folder from Desktop into the apache-maven folder
- configure Java JDK Path and Maven path in .bash_profile:
- download Java JDK for Mac OS X - http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- open a terminal and type: /usr/libexec/java_home - then copy the path for the java idk that is returned
- type the following four commands into the terminal, hit enter after each one:export
- JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home (if this path differs from the one you copied, substitute it with the one you copied)
- export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.9
- export M2=$M2_HOME/bin
- export PATH=$M2:$PATH
- type command in terminal: source ~/.bash_profile
- verify Java JDK and Maven are installed by typing command in terminal: mvn —v