maven連接私服的配置分為兩步:
1、配置maven可以連接私服打包上傳項(xiàng)目(maven的deploy指令)
在maven安裝目錄下的配置文件settings.xml中添加:
添加到servers標(biāo)簽內(nèi)部
snapshots
admin
admin123
releases
admin
admin123
在項(xiàng)目中的pom.xml文件中添加:
releases
https://192.168.2.32:8081/nexus/content/repositories/releases/
snapshots
https://192.168.2.32:8081/nexus/content/repositories/snapshots/
2、配置maven可以從私服上下載jar包
在maven安裝目錄下的配置文件settings.xml中添加:
添加到profiles標(biāo)簽內(nèi)部
dev
nexus
https://192.168.2.32:8081/nexus/content/groups/public/
true
true
public
Public Repositories
https://192.168.2.32:8081/nexus/content/groups/public/
在配置文件settings.xml中添加用以激活上面的配置:
dev