maven的pom.xml多个仓库配置

1、单个仓库配置如下,发布到远程仓库的命令是: mvn deploy
nexus-releases-local
Nexus Release Repository
http://{ip}:{port}/nexus/content/repositories/releases/ //配置私服的地址
nexus-snapshots-local
Nexus RELEASE Repository
http://{ip}:{port}/nexus/content/repositories/snapshots/
 
 2、多个仓库配置如下,发布到远程仓库的命令是: mvn deploy -P {仓库id}
chengDu //配置仓库1的id
nexus-releases-local
Nexus Release Repository
http://{ip}:{port}/nexus/content/repositories/releases/ //配置私服的地址
nexus-snapshots-local
Nexus RELEASE Repository
http://{ip}:{port}/nexus/content/repositories/snapshots/
 
shenZhen //配置仓库2的id
nexus-releases-local
Nexus Release Repository
http://{ip}:{port}/nexus/content/repositories/releases/ //配置私服的地址
nexus-snapshots-local
Nexus RELEASE Repository
http:/{ip}:{port}/nexus/content/repositories/snapshots/ //配置私服的地址
true //设置默认仓库为仓库2
 

你可能感兴趣的:(maven的pom.xml多个仓库配置)