阿里maven倉庫地址換了,使用老地址有可能使java項目出現各類問題

使用maven的java項目編譯和發佈錯誤,有些是maven倉庫引發的,java

例如dependencies could not be resolved錯誤,這個錯誤的提示有可能象這樣:
node


[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 in http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun has elapsed or updates are forcedspring


有同窗遇到這個問題,他這個項目的maven配置文件爲:apache

......maven

    <localRepository>D:\workspace-4.7\repository</localRepository>ide

......gradle

    <mirrors>google

        <mirror>阿里雲

            <id>nexus-aliyun</id>url

            <mirrorOf>central</mirrorOf>

            <name>Nexus aliyun</name>

            <url>http://maven.aliyun.com/nexus/content/groups/public</url>

        </mirror>

......


實際上http://maven.aliyun.com/nexus/content/groups/public已是老地址了,老地址有不可預料的各類問題,須要改成新地址:

......

<mirror>

<id>aliyunmaven</id>

<mirrorOf>*</mirrorOf>

<name>阿里雲公共倉庫</name>

<url>https://maven.aliyun.com/repository/public</url>

</mirror>

......


阿里雲的新地址彙總以下:

倉庫名稱

阿里雲倉庫地址

阿里雲倉庫地址(老版)

源地址

central

https://maven.aliyun.com/repository/central

https://maven.aliyun.com/nexus/content/repositories/central

https://repo1.maven.org/maven2/

jcenter

https://maven.aliyun.com/repository/public

https://maven.aliyun.com/nexus/content/repositories/jcenter

http://jcenter.bintray.com/

public

https://maven.aliyun.com/repository/public

https://maven.aliyun.com/nexus/content/groups/public

central倉和jcenter倉的聚合倉

google

https://maven.aliyun.com/repository/google

https://maven.aliyun.com/nexus/content/repositories/google

https://maven.google.com/

gradle-plugin

https://maven.aliyun.com/repository/gradle-plugin

https://maven.aliyun.com/nexus/content/repositories/gradle-plugin

https://plugins.gradle.org/m2/

spring

https://maven.aliyun.com/repository/spring

https://maven.aliyun.com/nexus/content/repositories/spring

http://repo.spring.io/libs-milestone/

spring-plugin

https://maven.aliyun.com/repository/spring-plugin

https://maven.aliyun.com/nexus/content/repositories/spring-plugin

http://repo.spring.io/plugins-release/

grails-core

https://maven.aliyun.com/repository/grails-core

https://maven.aliyun.com/nexus/content/repositories/grails-core

https://repo.grails.org/grails/core

apache snapshots

https://maven.aliyun.com/repository/apache-snapshots

https://maven.aliyun.com/nexus/content/repositories/apache-snapshots

https://repository.apache.org/snapshots/

相關文章
相關標籤/搜索