Install maven on MacOSX:
Pre-requisite: JDK 1.7 or above
Way 1: Without using brew (preferred):
Step 1: Download "apache-maven-3.3.9-bin.tar.gz" from "https://maven.apache.org/download.cgi"
Step 2: Unzip the downloaded folder to the location you want.
Step 3: Set environment variable for maven in bash_profile.
> vim ~/.bash_profile
Step 4: Set path of maven/bin folder (which contains mvn file) in bash_profile as:
> export M2_HOME="path to apache-maven-3.3.9"
> export PATH=$PATH:$M2_HOME/bin
Save and quit bash_profile.
Step 5: check maven version.
> mvn -v
Way 2: using homebrew:
Step 1: Install homebrew using command:
> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 2: Install maven using brew:
> brew install maven
Step 3: check maven version
> mvn -v
Pre-requisite: JDK 1.7 or above
Way 1: Without using brew (preferred):
Step 1: Download "apache-maven-3.3.9-bin.tar.gz" from "https://maven.apache.org/download.cgi"
Step 2: Unzip the downloaded folder to the location you want.
Step 3: Set environment variable for maven in bash_profile.
> vim ~/.bash_profile
Step 4: Set path of maven/bin folder (which contains mvn file) in bash_profile as:
> export M2_HOME="path to apache-maven-3.3.9"
> export PATH=$PATH:$M2_HOME/bin
Save and quit bash_profile.
Step 5: check maven version.
> mvn -v
Way 2: using homebrew:
Step 1: Install homebrew using command:
> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Step 2: Install maven using brew:
> brew install maven
Step 3: check maven version
> mvn -v
No comments:
Post a Comment