Eclipse configures MAVEN and modifies the default repository

Source: Internet
Author: User

Summarize eclipse's configuration of maven today for easy configuration later.

I. Configuring the MAVEN Environment

1. Download the Apache-maven file, select the version you want, address: http://mirrors.cnnic.cn/apache/maven/maven-3/3.2.3/binaries/apache-maven-3.2.3-bin.zip

2. Unzip 1 downloaded files, I extract to: D:\Software_IDE\apache-maven-3.0.4

3. Configure MAVEN Environment variables

A. maven_home:d:\software_ide\apache-maven-3.0.4

B.path:%maven_home%\bin;

4. Enter Mvn-v in CMD, if the following information appears, indicating that the configuration was successful.

It shows the Java configuration environment and the MAVEN configuration environment


Two. Modifying the Maven warehouse path

I would like to put on the D-plate, individual according to their own circumstances

1. Create a new file in the D drive as follows:


2. Configure the Setting.xml file in D:\m2 with the following contents:

<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" ><?xml version= "1.0" encoding= "UTF-8"? ><settings xmlns= "http://maven.apache.org/SETTINGS/1.0.0"           Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"           xsi:schemalocation= "Http://maven.apache.org/SETTINGS /1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd "><plugingroups/><proxies/><servers/> <mirrors/><localrepository>d:/m2/repository</localrepository></settings></span>
3. Configure the Setting.xml file in the D:\Software_IDE\apache-maven-3.0.4\conf, locate the localrepository, and modify the required path

<span style= "FONT-FAMILY:KAITI_GB2312;FONT-SIZE:18PX;" ><localRepository>D:\m2\repository</localRepository></span>
three. Configuring Maven in Eclipse

1. Open Eclipse, find Window->preferences->maven,


2. Configure setting


Well, it's done, you can try.




Eclipse configuration maven and modify default repository

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.