How to install maven on Mac ?

Use this simple command : $ brew install maven

Below is sample command output

➜ aws-java-sample git:(master) brew install maven
==> Downloading https://www.apache.org/dyn/closer.cgi?path=maven/maven-3/3.3.9/b
==> Best Mirror http://download.nextag.com/apache/maven/maven-3/3.3.9/binaries/a
######################################################################## 100.0%
🍺 /usr/local/Cellar/maven/3.3.9: 94 files, 9.6M, built in 51 seconds
➜ aws-java-sample git:(master)

To validate if it is installed successfully : $  mvn -version 

Below is sample command output

➜ aws-java-sample git:(master) mvn -version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
Maven home: /usr/local/Cellar/maven/3.3.9/libexec
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: “mac os x”, version: “10.10.5”, arch: “x86_64”, family: “mac”
➜ aws-java-sample git:(master)

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s