maven項目如何從私服nexus中下載依賴包
解決方法:
1.打開maven的config目錄中settings.xml文件
2.在<profile></profiles>之間添加以下代碼:
<profile>
<id>central</id>
<repositories>
<repository>
<id>central</id>
<url>http://gisserver2:9081/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
3.在<profile></profiles>后面添加以下代碼(使配置文件始終處於活動狀態):
<activeProfiles>
<activeProfile>central</activeProfile>
</activeProfiles>