Sunday, January 31, 2016

Quick Maven Installation on Mac

Hi Friends,  Lets see how we can quickly install and configure maven in your Mac machine.

There is 2 way to install maven in your mac machine you can use any one of them according to your need

A. Using brew command

Steps to Follow:

1. Check your homebrew version

     $ brew -v

2. If it's not 0.9.5, reinstall it by running these commands: (Optional)

    $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

    $ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

3. Install maven
   
    $ brew install maven

4. Check maven version

   $ mvn -v








OR

B. Using Tar.gz file

Steps to Follow

1. Download Maven tar.gz file from Appache Site

2. Extract file to your home directory 
    
    $ cd

    $ tar -xvf ~/Downloads/apache-maven-3.3.9-bin.tar.gz






3. Go to extracted file and copy apache-maven path

    $ cd /Users/tapashwani/apache-maven-3.3.9
    $ pwd 

4. Set Maven path in your ~/.bash_profile file

    $ vi ~/.bash_profile









4. Check maven version

   $ mvn -v

You are all set now, hope this post help you to solve your problem

No comments:

Post a Comment