IntelliJ IDEA添加MAVEN插件
https://www.cnblogs.com/LaoJiangLJ/p/8973225.html
打开 File → Other Settings → Default Settings
修改MAVEN默认的地址,重新选择配置文件
☆特别注意,在配置的时候一定要选择 Default Settings要不然每次新建其他工程都会默认使用IDEA自带的MAVEN
修改MAVEN安装路径下conf文件中的settion.xml文件
1.设置默认仓库地址(我这里设置的是本地D:\JAVATools\MvnRepo)
2.设置MAVEN的远程仓库路径,默认的地址由于国内特殊原因比较慢,我一般只用了第一个阿里的远程仓库
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirror</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">id</span>></span>uk<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">id</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirrorOf</span>></span>central<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirrorOf</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">name</span>></span>Human Readable Name for this Mirror.<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">name</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">url</span>></span>http://uk.maven.org/maven2/<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">url</span>></span>
<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirror</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirror</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">id</span>></span>CN<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">id</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">name</span>></span>OSChina Central<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">name</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">url</span>></span>http://maven.oschina.net/content/groups/public/<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">url</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirrorOf</span>></span>central<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirrorOf</span>></span>
<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirror</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirror</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">id</span>></span>nexus<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">id</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">name</span>></span>internal nexus repository<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">name</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">url</span>></span>http://repo.maven.apache.org/maven2<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">url</span>></span>
<span class="hljs-tag"><span class="hljs-tag"><</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirrorOf</span>></span>central<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirrorOf</span>></span>
<span class="hljs-tag"><span class="hljs-tag"></</span><span class="hljs-title"><span class="hljs-tag"><span class="hljs-name">mirror</span>></span><br><br>修改完setting.xml文件后将setting.xml文件复制一份到你刚刚定义的默认仓库地址中</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></code></pre>