Configuring Maven on Eclipse

Source: Internet
Author: User

1. Download the MAVEN version

   Website address: http://maven.apache.org/download.cgi

Download maven URL directly: https://mirrors.tuna.tsinghua.edu.cn/apache//maven/

The suffix tar.gz is available on Linux systems, and the suffix zip can be used directly on Windows systems

Binary indicates that the compiled binary file source indicates that the source code is included

  

2. Modifying maven configuration file Parameters (Take apache-maven-3.3.9 as an example)

 apache-maven-3.3.9→conf→settings.xml(mainly to find this profile), do the following in this configuration file

2.1 Locate the <localRepository>/path/to/local/repo</localRepository> statement in the comment, cancel the statement's comment, and set

Set up the local repository (the location of files and jar packages that are downloaded based on dependencies, which is defined by the path )

<localRepository>D:/maven/r2/myrepository</localRepository>

2.2 Modifying the JDK version ()

Maven 3.3+ requires JDK 1.7 or higher to execute-they still allow you to build 1.3 and other JDK versions by using Toolchain

Uncomment the <profile>...</profile> content within the <profiles> tag range, and configure the appropriate JDK version according to the actual situation

        

2.3 Modifying the Mirror address

      

3. Configure Maven on Eclipse

 Action path: Window→preferences→maven→installations→add

3.1 Adding a Maven version

    

  3.2 Setting the currently used maven version

    

3.3 When downloading the jar package, you can download the relevant source files at the same time.

    

4. Configure MAVEN Environment variables 

M2_home maven File path

5. An error occurred : Tomcat could not find the parameters to set

window→preferences→java→installed jres-→jdk Edit, VM arguments add the following statement

-dmaven.multimoduleprojectdirectory= $M 2_home

If you have m2_home this system variable in the system variable

    

    

  

  

Configuring Maven on Eclipse

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.