Intellij IDEA配置 Maven中央仓库
本文最后更新于:2025年8月22日 晚上
如果是使用的IDEA内置的Maven,那就到你IDEA的安装路径下找以下路径 :
.\JetBrains\IntelliJ IDEA Community Edition 2017.2\plugins\maven\lib
里面会有你的IDEA内置的maven,我的是 maven2
和 maven3
接下来分别配置maven的 settings.xml
文件
.\lib\maven*\conf\settings.xml
打开配置文件后,搜索如下key值 mirrors
, 添加 mirror
节点。 注:
由于国内访问Maven的仓库连通率非常低,而阿里云提供了一个Maven的国内镜像,使用阿里云的节点速度会快很多
<mirrors>
<!--mirror
| Specifies a repository mirror site to use instead of a given repository. The repository that
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
|
<mirror>
<id>mirrorId</id>
<mirrorOf>repositoryId</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://my.repository.com/repo/path</url>
</mirror>
-->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
就先记这么多,以后会慢慢补充。
Intellij IDEA配置 Maven中央仓库
https://blog.doracoin.cc/posts/development/28052.html