下載連接: http://pan.baidu.com/s/1i3y4uzV 密碼: pk4kapache
解壓maven到D:\Program Files (x86)\MyEclipse-8.6目錄下windows
新建MAVEN_HOME:D:\Program Files (x86)\MyEclipse-8.6\apache-maven-3.0.5網絡
編輯PATH添加:%MAVEN_HOME%\bin;maven
cmd中輸入mvn -v,結果以下測試
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 21:51:this
28+0800)url
Maven home: D:\Program Files (x86)\MyEclipse-8.6\apache-maven-3.0.5\bin\..spa
Java version: 1.7.0_17, vendor: Oracle Corporationrest
Java home: D:\Java\jdk1.7.0_17\jreorm
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
1.MyEclipse》MyEclipse configuration center》software》My Software》選擇Maven Support for MyEclipse,remove
2.Apply Changes,執行變化,這裏須要斷開網絡,不然很長時間都沒法完成。
3.restart
1.建立Maven倉庫目錄E:\Reporsitory\Maven
2.修改maven配置文件D:\Program Files (x86)\MyEclipse-8.6\apache-maven-3.0.5\conf\settings.xml
a.添加本地倉庫目錄:<localRepository>E:\Reporsitory\Maven</localRepository>
b.添加遠程倉庫站點鏡像:注意修改站點地址!
<mirror>
<id>nexus</id>
<mirrorOf>central</mirrorOf>
<name>Human Readable Name for this Mirror.</name>
<url>http://xxxx/nexus/content/groups/public</url>
</mirror>
3.配置MyEclipse Maven支持
a.添加maven:%MAVEN_HOME%,Window --> Preferences --> Maven-->installations-->add
b.設置配置文件
D:\Program Files (x86)\MyEclipse-8.6\apache-maven-3.0.5\conf\settings.xml