接上一篇maven
1. http://www.sonatype.org/nexus/go 下載 nexus解壓ui
2.添加環境變量 將E:\nexus\nexus-2.8.1-01\bin 添加到path中this
3. 按操做安裝啓動url
http://localhost:8081/nexus/進入 能進說明安裝成功。 默認 帳號admin admin123
spa
4.修改maven目錄下repo中的settings.xml 配置文件code
<mirrors> <!--設置nexus爲鏡像--> <mirror> <id>nexusMirrors</id> <!--全部訪問都執行這個url--> <mirrorOf>*</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://localhost:8081/nexus/content/groups/public/</url> </mirror> </mirrors>
<!--用來覆蓋meven中自帶的中心倉庫 maven中maven-model-builder-3.2.2.jar中有個poi.xml 裏面有內容,若是本地倉庫和nexus倉庫中都沒有則再也不向maven倉庫去下載-->xml
<profiles> <profile> <id>centralProfile</id> <repositories> <repository> <id>central</id> <name>central Repository</name> <!--http://*也能夠好像--> <url>http://central</url> <layout>default</layout> <releases> <enabled>true</enabled> </releases> <!--修改原來默認不下載snapshots 版本的包--> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> </profile> </profiles>
<!--開啓profile-->
it
<activeProfiles> <activeProfile>centralProfile</activeProfile> </activeProfiles>