Maven repository configuration under Eclipse

The maven configuration information is in the conf folder under the installation directory, find the settings.xml file, and create a folder other than the C drive, such as D:\repository, to store the jar package downloaded by maven

local repository configuration

Find the <localRepository> tag in the settings.xml file and replace the content with the file directory just created

 <localRepository>D:\repository</localRepository>

Central warehouse mirror configuration

Find the <mirrors> tag and replace the content. Alibaba Cloud's warehouse mirror is used here, and the download speed is very fast.

<mirrors>
     <mirror>
      <id>alimaven</id>
      <name>aliyun maven</name>
      <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
      <mirrorOf>central</mirrorOf>
    </mirror>

</mirrors>

After the configuration, open Wndow->Preferences->Maven->User Settings in eclipse, select the settings.xml file just configured through Browse, and then click Update Settings->Apply

Eclipse uses the built-in maven by default. To use the maven installed by yourself, you need to configure Installations


Then click Add, click Directory in the pop-up dialog box


Select the maven root directory you installed and click Finish


Check the maven you just added, and finally Apply


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325809397&siteId=291194637