How to install Maven on Mac OSX Mavericks

Hello everyone,

I am going to guide you through the brief and baby steps of the installation of Maven on new Mac OSX Mavericks.

There are only few steps which you need to follow. Please follow them carefully.

1. Go to the apache maven website and download the latest stable binary file which is Maven 3.2.1

2. Extract the zip or the tar ball and copy the entire folder to the /usr/local/apache-maven directory.

3. Please create the apache-maven folder under /usr/local directory. So, the final path will look something like this : /usr/local/apache-maven/apache-maven-3.2.1

4. Now, open the terminal and go to the above location by typing the following command: cd /usr/local/apache-maven/apache-maven-3.2.1

5. Now run the following commands in a sequential order:

$export M2_HOME=/usr/local/apache-maven/apache-maven-3.2.1

$export M2=$M2_HOME/bin

$export PATH=$M2:$PATH

6. Now check whether you have the proper JAVA_HOME environment variable set on your machine by running the following command : $echo $JAVA_HOME

It should look something like this:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

7. You are done with the installation. Now, simply type mvn –version to check if it echoes the details of the maven version installed on your system. You will see the following if the maven is successfully installed.

Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T23:07:52+05:30)

Maven home: /usr/local/apache-maven/apache-maven-3.2.1

Java version: 1.6.0_65, vendor: Apple Inc.

Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

Default locale: en_US, platform encoding: MacRoman

OS name: “mac os x”, version: “10.9.2”, arch: “x86_64”, family: “mac”

Happy Coding😀

 

6 comments

  1. I would like to thank you for the efforts you have put in writing this internet internet site. Im hoping exactly the same high-grade web site post from you inside the upcoming as well. In fact your creative writing abilities has inspired me to get my own website now. Really the blogging is spreading its wings rapidly. Your write up can be a great example of it.

  2. An fascinating discussion is worth comment. I do feel that you need to write read much more about this topic, it will not be considered a taboo subject but typically every person is too few to communicate in on such topics. To an additional. Cheers

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