IntelliJ IDEA adds MAVEN plugin

打开 File → Other Settings → Default Settings 
write picture description here

Modify the default address of MAVEN and re-select the configuration file

write picture description here
☆Special attention, be sure to select Default Settings when configuring, otherwise every time you create another project, the MAVEN that comes with IDEA will be used by default

Modify the setting.xml file in the conf file under the MAVEN installation path
1. Set the default warehouse address (I set the local D:\JAVATools\MvnRepo here) 
write picture description here

2. Set the remote warehouse path of MAVEN. The default address is relatively slow due to special domestic reasons. I generally only use the first remote warehouse of Ali.
write picture description here

<mirror>
        <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>uk</id> <mirrorOf>central</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://uk.maven.org/maven2/</url> </mirror> <mirror> <id>CN</id> <name>OSChina Central</name> <url>http://maven.oschina.net/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nexus</id> <name>internal nexus repository</name> <url>http://repo.maven.apache.org/maven2</url> <mirrorOf>central</mirrorOf> </mirror>

修改完setting.xml文件后将setting.xml文件复制一份到你刚刚定义的默认仓库地址中

Guess you like

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