Install and configure maven warehouse + modify the location of mavne warehouse in idea

Reference link: https://blog.csdn.net/weixin_43811057/article/details/108235117

maven resource acquisition

Official maven download address: https://maven.apache.org/download.cgi
or directly use my installation package, download address: https://download.csdn.net/download/Silly011/85060950

Install

Unzip the maven archive to a folder without Chinese, spaces or other special characters to use.
If you use the resources provided by me, you can directly extract it to the D drive.
insert image description here
insert image description here

Placement MAVEN_HOME

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

After that, click OK to return to the properties page of this computer, that is, the save is successful.

Test whether maven is installed and configured successfully

Window+R key and then enter cmd
or search for cmd directly in the menu bar to find the command prompt
insert image description here

Then the data mvn -v
insert image description here
installation configuration is successful

Configure local repository

1. Create a new repository folder
. Mine is built in the maven folder under the d drive.
insert image description here
2. The location of the local warehouse is configured through the maven core configuration file (settings.xml).
The settings.xml file is located in the maven installation directory: for
example:
D:\Maven\apache-maven-3.3.9\conf\settings.xml
insert image description here
Modify the location of the local warehouse repository
insert image description here

insert image description here

Modify mirror-to Alibaba Cloud Private Server

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

insert image description here

Modify the location of the maven warehouse in the idea

File->Settings
insert image description here
search maven directly, or find maven by following step 1
insert image description here

Guess you like

Origin blog.csdn.net/Silly011/article/details/123880848