2022年開始,阿里云對以前的maven倉庫地址進(jìn)行升級(jí),由原來的http換成https,所以maven配置和IntelliJ IDEA需要進(jìn)行對應(yīng)的一些調(diào)整
原來鏈接:http://maven.aliyun.com/repository/public
現(xiàn)在鏈接:https://maven.aliyun.com/repository/public
maven settings.xml配置
maven settings.xml
配置,先加上<mirror>
<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共倉庫</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
加上profile
配置,在IDEA里才能進(jìn)行profile的選擇
<profiles>
<profile>
<id>aliyun</id>
<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>aliyun</activeProfile>
</activeProfiles>
IDEA配置支持https
在上面的maven settings.xml配置好之后,為了使下載依賴更順暢,需要在IDEA里,進(jìn)行設(shè)置,選擇File->Settings,如圖所示,加上配置
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
繼續(xù)點(diǎn)擊Maven–Runner ,在VM options 中加入配置文章來源:http://www.zghlxwxcb.cn/news/detail-739442.html
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true
點(diǎn)擊Apply,保存配置文章來源地址http://www.zghlxwxcb.cn/news/detail-739442.html
到了這里,關(guān)于Maven配置阿里云倉庫支持https的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!