Eclipse Configuration Maven

Source: Internet
Author: User

  1. Check Java_home environment variables
    C:\users\administrator>echo%java_home%

  2. Unzip the MAVEN Core program installation package and place it in a non-Chinese path without spaces
    D:\apache-maven-3.5.0-bin

  3. Configuring the environment variables for MAVEN
    ① configuration Maven_home or M2_home
    Configure M2_home to D:\apache-maven-3.5.0-bin\conf
    Add D:\apache-maven-3.5.0-bin\bin under Path (contains bin)
    ② Verify: Run the mvn-v command to view MAVEN version information

    650) this.width=650; "title=" 4@pxz_i%p_ ' T3~4c0x%xmo6.png "src=" https://s2.51cto.com/oss/201710/25/ A513376016ffda9bd2984a03b1694eaf.png-wh_500x0-wm_3-wmp_4-s_2768596520.png "alt=" A513376016ffda9bd2984a03b1694eaf.png-wh_ "/>

  4. Setting up the MAVEN local core repository
    ① Copy D:\apache-maven-3.5.0-bin\conf\settings.xml Path
    ② Add <localRepository>D:\RepMaven</localRepository> Tag

  5. Using Maven in Eclipse
    ①maven plugin: Eclipse built-in
    ②maven Plugin Settings
    [1]installations: Specifies the location of the MAVEN core program and does not recommend the use of the own MAVEN program, but instead uses the self-extracting MAVEN program
    [2]user setting specifies the location of the Conf/setting.xml to obtain the local location of the central warehouse

  6. Set Maven to use JDK version by default
    ① Open D:\apache-maven-3.5.0-bin\conf\settings.xml
    Add in ②<profiles></profiles>


<profile>       <id>jdk1.8</id>          <activation>            <activeByDefault>true</activeByDefault>             <jdk>1.8</jdk>         </ activation>        <properties>            <maven.compiler.source>1.8</maven.compiler.source>             <maven.compiler.target>1.8</ maven.compiler.target>            < maven.compiler.compilerversion>1.8</maven.compiler.compilerversion>        </properties>  &nbSp; </profile> 


Eclipse Configuration Maven

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.