IntelliJ IDEA設置自帶的maven為國內鏡像


找到idea中maven中的“settings.xml”位置

一般在idea安裝目錄下的“D:\Program Files\JetBrains\IntelliJ IDEA\plugins\maven\lib\maven3\conf”

有maven2和maven3選擇

打開settings.xml,其中查找“<localRepository>”標簽

<localRepository>”標簽的注釋后面加 自建的maven倉庫位置 語句:

<localRepository>D:\Program Files\Maven\repository</localRepository>

查找“<mirrors>”標簽

在“<mirrors>”標簽的注釋后面 加下面語句:

<mirror>
<id>aliyun-public</id>
<mirrorOf>*</mirrorOf>
<name>aliyun public</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>

<mirror>
<id>aliyun-central</id>
<mirrorOf>*</mirrorOf>
<name>aliyun central</name>
<url>https://maven.aliyun.com/repository/central</url>
</mirror>

<mirror>
<id>aliyun-spring</id>
<mirrorOf>*</mirrorOf>
<name>aliyun spring</name>
<url>https://maven.aliyun.com/repository/spring</url>
</mirror>

<mirror>
<id>aliyun-spring-plugin</id>
<mirrorOf>*</mirrorOf>
<name>aliyun spring-plugin</name>
<url>https://maven.aliyun.com/repository/spring-plugin</url>
</mirror>

 

更多的AliRepo倉庫服務,可以查看https://maven.aliyun.com/mvn/view 獲取

 https://maven.aliyun.com/mvn/guide

Repository
Type
Policy
Path
apache snapshots
proxy
SNAPSHOT
https://maven.aliyun.com/repository/apache-snapshots
central
proxy
RELEASE
https://maven.aliyun.com/repository/central
google
proxy
RELEASE
https://maven.aliyun.com/repository/google
gradle-plugin
proxy
RELEASE
https://maven.aliyun.com/repository/gradle-plugin
jcenter
proxy
RELEASE
https://maven.aliyun.com/repository/jcenter
spring
proxy
RELEASE
https://maven.aliyun.com/repository/spring
spring-plugin
proxy
RELEASE
https://maven.aliyun.com/repository/spring-plugin
public
group
RELEASE
https://maven.aliyun.com/repository/public
releases
hosted
RELEASE
https://maven.aliyun.com/repository/releases
snapshots
hosted
SNAPSHOT
https://maven.aliyun.com/repository/snapshots
grails-core
proxy
RELEASE
https://maven.aliyun.com/repository/grails-core
mapr-public
proxy
RELEASE
https://maven.aliyun.com/repository/mapr-public

 
請點擊倉庫查看詳情
 
IEDA中使用maven創建Project過程網絡獲取時間漫長,Properties中創建

Name=archetypeCatalog
Value=internal

可選擇內置倉庫優先。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM