1.要将源码包放上私服,首先pom文件要修改插件(针对springboot项目)
org.apache.maven.plugins maven-compiler-plugin
2.在pom文件添加如下配置(里面路径是你自己的私服地址)
Releases Project RELEASE http://xxxxxxx:8081/nexus/content/repositories/releases Snapshots Porject SNAPSHOTS http://xxxxxxx:8081/nexus/content/repositories/snapshots
3.在maven的配置文件setting.xml中,添加配置
...... Releases xxx xxx Snapshots xxx xxx
4.运行命令
mvn deploy -Dmaven.test.skip=true