Mac builds maven and Eclipse development environment

Source: Internet
Author: User

1. Configure MAVEN to check settings for the following Java environment variables. Need to check Java_home environment variables and Java commands

$ echo $JAVA _home

/library/java/javavirtualmachines/jdk1.8.0_66.jdk/contents/home

$ java-version

Java Version "1.8.0_66"

Java (TM) SE Runtime Environment (build 1.8.0_66-b17)

Java HotSpot (TM) 64-bit Server VM (build 25.66-b17, Mixed mode)

2.

Then go to http://maven.apache.org/download.html to download the MAVEN installation files, such as apache-maven-3.3.9-bin.tar.gz, then unzip to the local directory

Next, we need to set the M2_HOME environment variable to point to apache-maven-3.3.9, and add the bin/folder under the MAVEN installation directory to the system environment variable path:

Vim opens the ~/.bash_profile file by adding the following code:

Export M2_home= here Write the installation path/apache-maven-3.3.9

Export path= $PATH: $M 2_home/bin

Now that the installation is complete, we can run the following command to check the MAVEN installation:

$ echo $M 2_home

$ mvn-version

Apache Maven 3.3.9 (BB52D8502B132EC0A5A3F4C09453C07478323DC5; 2015-11-11t00:41:47+08:00)

Maven Home:/users//data/soft/apache-maven-3.3.9

Java version:1.8.0_66, Vendor:oracle Corporation

Java Home:/library/java/javavirtualmachines/jdk1.8.0_66.jdk/contents/home/jre

Default LOCALE:ZH_CN, Platform Encoding:utf-8

OS name: "Mac OS X", Version: "10.10.5", Arch: "X86_64", Family: "Mac"

3. Install the Eclipse plugin M2eclipse

    • Open Eclipse, select Help->install New software
    • ClickAdd...

      HTTP://M2ECLIPSE.SONATYPE.ORG/SITES/M2E
    • Click OK to wait for the installation to complete
    • Installation verification:
      Restart Eclipse, help-about eclipse-installation Details
      In the Installed Software tab, check that the module you just selected is in this list

      Check to see if Eclipse has supported the creation of MAVEN projects:
      File-to--and other, find Maven, and if it's all right, it means that M2eclipse is properly installed.

    • 4 Maven Project Import

      • Import in Eclipse selects the MAVEN project that already exists,

        Eclipse Import Maven Project
      • Select the project you want to import, click Finish

Mac builds maven and Eclipse development environment

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.