Maven deploy
一、配置私服账号密码
修改maven配置文件,在$MAVEN_HOME/conf/setting.xml中增加如下配置:
<repository> <id>rdc-releases</id> <url>https://repo.rdc.aliyun.com/repository/xxxx-release-xxxx/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>rdc-snapshots</id> <url>https://repo.rdc.aliyun.com/repository/xxxx-snapshot-xxxx/</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository>
注意,这里配置的id为
rdc-releases
/
rdc-snapshots
,当然可以改为其他,先记得这里有过id的配置,后面有用
二、配置远程发布到私服
修改项目pom文件,,增加如下配置:
<distributionManagement> <repository> <id>rdc-releases</id> <url>https://repo.rdc.aliyun.com/repository/xxxx-release-xxxx/</url> </repository> <snapshotRepository> <id>rdc-snapshots</id> <url>https://repo.rdc.aliyun.com/repository/xxxx-snapshot-xxxx/</url> </snapshotRepository> </distributionManagement>
注意,这里的id就是之前配置的id
三、执行部署操作
mvn deploy

浙公网安备 33010602011771号