MAVEN Configuration under Mac

Source: Internet
Author: User

1. Download maven:http://maven.apache.org/download.cgi
2, the download to the compressed package to the appropriate directory, the local directory structure is/users/jiangzhiqiang/local/apache-maven-3.2.53, and then configure the environment variables. See if there is a. bash_profile file under ~/, and if not, create an environment variable to configure in this file. Create File: Shell code
    1. Touch ~/.bash_profile
Edit Bash_profile File: Shell code
    1. VI ~/.bash_profile
Configure the following four environment variables:
Shell Code
    1. # The directory where MAVEN resides
    2. Export m2_home=/users/jiangzhiqiang/local/apache-maven-3.2. 5
    3. # The directory where Maven bin resides
    4. Export m2= $M 2_home/bin
    5. # Add the Maven bin to the PATH variable
    6. Export path= $M 2: $PATH
    7. # Configure the directory where the Java_home is located, note that there should be a bin folder under this directory, there should be Java and other commands under the bin
    8. Export JAVA_HOME=/LIBRARY/JAVA/JAVAVIRTUALMACHINES/JDK1. 7.0_71.jdk/contents/home
3. Execute force command shell code in terminal
    1. SOURCE ~/.bash_profile
4, in the New command line window to execute mvn-v, if the normal display of the MAVEN version and other information, is the configuration is successful. quote:http://blog.csdn.net/shijiedemuguang/article/details/38865331

MAVEN Configuration under Mac

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.