-
Notifications
You must be signed in to change notification settings - Fork 0
Environment
Robin T edited this page Sep 20, 2019
·
3 revisions
xcode-select --install
Run git status to get installation suggestion.
After command line tools is installed, try this oneliner to install Homebrew.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install latest version with brew cask install java
Install custom version with brew cask install homebrew/cask-versions/java11
Add to .bashrc or .profile or .bash_profile.
export JAVA_11_HOME=$(/usr/libexec/java_home -v 11)
export JAVA_12_HOME=$(/usr/libexec/java_home -v 12)
alias java11='export JAVA_HOME=$JAVA_11_HOME'
alias java12='export JAVA_HOME=$JAVA_12_HOME'
# default version
java11
Reload .bashrc by running source .bashrc.
run brew update following by brew install maven.
Update .bashrc with following variables:
export M2_HOME=/usr/local/Cellar/maven/3.6.2/libexec
export M2=${M2_HOME}/bin
export PATH=${PATH}:${M2_HOME}/bin
Optionally add maven options:
export MAVEN_OPTS='-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=14122 -DsocksNonProxyHosts=127.0.0.1|dl.bintray.com|repo.maven.apache.org'
brew cask install sublime-text