1. 程式人生 > >maven 其他遠程倉庫配置

maven 其他遠程倉庫配置

public central ram 需求 apach 其他 pac 比較 而在

在平時的開發中,我們往往不會使用默認的中央倉庫,默認的中央倉庫訪問的速度比較慢,訪問的人或許很多,有時候也無法滿足我們項目的需求,可能項目需要的某些構件中央倉庫中是沒有的,而在其他遠程倉庫中有,如JBoss Maven倉庫。這時,可以在pom.xml中配置該倉庫,代碼如下

<!-- 其他倉庫,按設定順序進行查找. -->
<repositories>
<repository>
<id>org.springframework.maven.milestone</id>
<name>Spring Framework Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<!-- 阿裏雲的maven倉庫 -->
<repository>
<id>nexus-aliyun</id>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
</repositories>

maven 其他遠程倉庫配置