1.概述
我们在使用seata 做分布式事务的时候,有时需要将 seata 发布到私服中,方便 修改和调整。
2.实现过程
2.1 在根目录下的pom.xml 中 增加发布配置
<distributionManagement><repository><id>jpaas-release</id><url>http://nexus.redxun.cn:18081/repository/jpaas-hosted/</url></repository><snapshotRepository><id>jpaas-snapshots</id><url>http://nexus.redxun.cn:18081/repository/jpaas-snapshots/</url></snapshotRepository></distributionManagement>
2.2 执行发布命令
mvn clean deploy -pl seata-spring-boot-starter -am -s D:\mvn\settings_new.xml -DaltDeploymentRepository=jpaas-release::default::http://nexus.redxun.cn:18081/repository/jpaas-hosted/ -DskipTests
这里需要指定私服仓库,否则会发布到 apache 官方的包服务器。
2.3 seata 的包路径做了调整
之前是 io.seata
现在新版的包路径变成了
org.apache.seata
<dependency><groupId>org.apache.seata</groupId><artifactId>seata-spring-boot-starter</artifactId>
</dependency>