美文网首页
maven 添加阿里云仓库

maven 添加阿里云仓库

作者: 良人与我 | 来源:发表于2019-03-23 17:31 被阅读0次

因为默认的Maven仓库是在国外,引入这些依赖的时候,可能速度非常慢,
阿里云做了一个中央仓库,把Maven仓库里的所有jar包复制过来,所以从阿里云仓库中引入依赖就变得很轻松了。
在 pom 中添加阿里仓库

<repositories><!-- 代码库 -->
        <repository>
            <id>maven-ali</id>
            <url>http://maven.aliyun.com/nexus/content/groups/public//</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>

参考
链接:https://www.jianshu.com/p/84bbb2aa0423

相关文章

网友评论

      本文标题:maven 添加阿里云仓库

      本文链接:https://www.haomeiwen.com/subject/mdfomqtx.html