修改maven目錄settings.xml文件
mirrors節點 添加如下配置
<id>nexus-aliyun</id>
<mirrorOf>central</mirrorOf>
<name>Nexus aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
配置本地倉庫
取消如下注釋並修改地址爲本地地址
<localRepository>/home/eva/repo</localRepository>
eclipse配置
Window
-> Preferences
-> Maven
下的 Installations
,單擊Add
,選擇maven的安裝目錄
Window
-> Preferences
-> Maven
下的 User Settings
,User Settings
項選擇maven安裝目錄下的settings.xml
文件。然後單擊Update Settings
即可。