Installing and configuring Maven under Mac OS x

Source: Internet
Author: User

1. Download maven
    1. Open Maven official website download page: http://maven.apache.org/download.cgi
      Download: apache-maven-3.5.0-bin.tar.gz

    2. Unzip the downloaded installation package to a directory, for example:/users/xxx/documents/maven

2. Configure Environment variables
    1. Open Terminel to enter the following command:
      vim ~/.bash_profileTo open a. bash_profile file, add a command to set environment variables in the secondary file
      export M2_HOME=/Users/xxx/Documents/maven/apache-maven-3.5.0
      export PATH=$PATH:$M2_HOME/bin
      After the addition is saved and launched, execute the following command to make the configuration effective:
      SOURCE ~/.bash_profile

3. Check if the configuration is in effect

1, enter: Mvn-v command, enter as follows:

   

Apache Maven3.5.0(ff8f5e7444045639af65f6095c62210b5713f426; .-Geneva-04t03: the: .+ ,:xx) Maven Home:/users/xxx/documents/maven/apache-maven-3.5.0Java Version:1.8. 0_121, Vendor:oracle Corporationjava home:/library/java/javavirtualmachines/jdk1.8.0_121.jdk/contents/home/Jredefault LOCALE:ZH_CN, platform Encoding:utf-8OS Name:"Mac OS X", Version:"10.12.6", Arch:"x86_64", Family:"mac"

The configuration succeeds.

Installing and configuring Maven under Mac OS x

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.