maven连接私服的配置分为两步:
1、配置maven可以连接私服打包上传项目(maven的deploy指令)
在maven安装目录下的配置文件settings.xml中添加:
添加到servers标签内部
snapshots
admin
admin123
releases
admin
admin123
在项目中的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标签内部
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