Install Maven
This post will guide through steps to Maven
Install Maven on Mac system easily and quickly. This post will give a complete walk through of installing Maven using brew
and manual installation
Install maven with brew
- Installing brew on Mac is simple process. You need to have
brew
installed on your system as a pre-requisite. You can install brew from here Install maven as
brew update brew install maven
Verify maven installation
Pavans-MacBook-Pro:~ pavanpkulkarni$ mvn --version Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T03:58:13-04:00) Maven home: /usr/local/Cellar/maven/3.5.2/libexec Java version: 1.8.0_152, vendor: Oracle Corporation Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_152.jdk/Contents/Home/jre Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "10.13.3", arch: "x86_64", family: "mac"
Install maven manually.
- Download maven from here.
Run the below command to un-compress the tar.
tar -xvf apache-maven-x.x.x-bin.tar.gz
Add M2_HOME to you .bash_profile file
export M2_HOME=/Users/pavanpkulkarni/apache-maven-x.x.x export PATH=$PATH:$M2_HOME/bin
Run
source ~/bash_profile
to reflect the changes. Open a new tab in terminal. Verify installation by runningmvn --version
Note :
Default maven repo location is ~/.m2/repository
. If you do not see a ~/.m2
directory, go ahead and create one as
touch ~/.m2
Share this post
Twitter
Google+
Facebook
LinkedIn
Email