解決maven下載緩慢問題

用maven開發的同學都知道,maven下載jar包是很慢的,畢竟要跨過太平洋,

之前用的方式一直都是在maven的配置文件裏面添加阿里雲的倉庫地址。

今天記錄一下如何在某一個項目裏面修改阿里雲地址(只針對一個項目好用)

 

在當前項目的pom加入一下代碼  放在和build標籤同級即可

<repositories>
    <repository>
        <id>nexus-aliyun</id>
        <name>Nexus aliyun</name>
        <layout>default</layout>
        <url>http://macen.aliyun.com/nexus/content/groups/public</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <enabled>true</enabled>
        </releases>
    </repository>
</repositories>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章