How to install Maven on Mac OS X Mavericks (10.9)

Source: Internet
Author: User



Step 1: Download maven binaries from maven Download Page. I was using the Maven 3.0.5, so I downloaded apache-maven-3.0.5-bin.tar.gz.



Step 2:you can install Maven at no location but since it's a one time process, I didn ' t wanted it in my user directory. So I installed it in/usr/local directory. You might has the use of sudo command to install in/usr/local directory if your is getting permission denied error.


$ cd /usr/local
$ sudo mv /Users/chang/Desktop/apache-maven-3.3.3-bin.tar.gz ./
$ sudo tar -xvf apache-maven-3.3.3-bin.tar.gz


Step 3:now Open the Bash profile file and add following lines into it. Usually profile file names is. bash_profile or. Profile, and use whichever the your system. If you do have a profile file, you'll have the to create one with VI command.


 
$ cd $HOME
$ vi .bash_profile
#Add below lines in the profile
export M2_HOME=/usr/local/apache-maven-3.3.3
export PATH=$PATH:$M2_HOME/bin
#save and quit
$ source .bash_profile 


That's it, MAVEN is installed on your latest MAC OS X and you can verify it by issuing below command.


$ mvn --version
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00)
Maven home: /usr/local/apache-maven-3.3.3
Java version: 1.7.0_71, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.10.3", arch: "x86_64", family: "mac"


Reference: Http://www.journaldev.com/2348/how-to-install-maven-on-mac-os-x-mavericks-10-9



How to install Maven on Mac OS X Mavericks (10.9)


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.