seata源码学习(1)-编译seata

下载源码

git clone https://github.com/seata/seata

修改POM

在根目录下的pom.xml文件中增加阿里云仓库

<repositories>
    <repository>
        <id>aliyun</id>
        <url>https://maven.aliyun.com/repository/public</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>aliyun-plugin</id>
        <url>https://maven.aliyun.com/repository/public</url>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

导入IDEA

等待IDEA自动导入maven成功

编译源码

执行maven install命令

mvn install -DskipTests -s D:configmavensetting.xml

-s指定配置文件是因为将仓库的目录放到了D盘

执行成功后将输出

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Seata Parent POM 1.5.0-SNAPSHOT 1.5.0-SNAPSHOT:
[INFO]
[INFO] Seata Parent POM 1.5.0-SNAPSHOT .................... SUCCESS [  2.572 s]
[INFO] seata-common 1.5.0-SNAPSHOT ........................ SUCCESS [  1.683 s]
[INFO] seata-config 1.5.0-SNAPSHOT ........................ SUCCESS [  0.091 s]
[INFO] seata-config-core 1.5.0-SNAPSHOT ................... SUCCESS [  1.244 s]
[INFO] seata-config-custom 1.5.0-SNAPSHOT ................. SUCCESS [  0.261 s]
[INFO] seata-config-apollo 1.5.0-SNAPSHOT ................. SUCCESS [  0.457 s]
[INFO] seata-config-nacos 1.5.0-SNAPSHOT .................. SUCCESS [  0.443 s]
[INFO] seata-config-zk 1.5.0-SNAPSHOT ..................... SUCCESS [  0.375 s]
[INFO] seata-config-consul 1.5.0-SNAPSHOT ................. SUCCESS [  0.302 s]
[INFO] seata-config-etcd3 1.5.0-SNAPSHOT .................. SUCCESS [  2.379 s]
[INFO] seata-config-spring-cloud 1.5.0-SNAPSHOT ........... SUCCESS [  0.244 s]
[INFO] seata-discovery 1.5.0-SNAPSHOT ..................... SUCCESS [  0.105 s]
[INFO] seata-discovery-core 1.5.0-SNAPSHOT ................ SUCCESS [  0.379 s]
[INFO] seata-core 1.5.0-SNAPSHOT .......................... SUCCESS [  2.383 s]
[INFO] seata-discovery-custom 1.5.0-SNAPSHOT .............. SUCCESS [  0.268 s]
[INFO] seata-discovery-consul 1.5.0-SNAPSHOT .............. SUCCESS [  0.280 s]
[INFO] seata-discovery-eureka 1.5.0-SNAPSHOT .............. SUCCESS [  0.391 s]
[INFO] seata-discovery-nacos 1.5.0-SNAPSHOT ............... SUCCESS [  0.257 s]
[INFO] seata-discovery-redis 1.5.0-SNAPSHOT ............... SUCCESS [  0.335 s]
[INFO] seata-discovery-sofa 1.5.0-SNAPSHOT ................ SUCCESS [  0.577 s]
[INFO] seata-discovery-zk 1.5.0-SNAPSHOT .................. SUCCESS [  0.320 s]
[INFO] seata-discovery-etcd3 1.5.0-SNAPSHOT ............... SUCCESS [  0.420 s]
[INFO] seata-tm 1.5.0-SNAPSHOT ............................ SUCCESS [  0.407 s]
[INFO] seata-dubbo 1.5.0-SNAPSHOT ......................... SUCCESS [  0.284 s]
[INFO] seata-http 1.5.0-SNAPSHOT .......................... SUCCESS [  0.259 s]
[INFO] seata-dubbo-alibaba 1.5.0-SNAPSHOT ................. SUCCESS [  0.237 s]
[INFO] seata-sofa-rpc 1.5.0-SNAPSHOT ...................... SUCCESS [  0.336 s]
[INFO] seata-motan 1.5.0-SNAPSHOT ......................... SUCCESS [  0.269 s]
[INFO] seata-rm 1.5.0-SNAPSHOT ............................ SUCCESS [  0.210 s]
[INFO] seata-sqlparser 1.5.0-SNAPSHOT ..................... SUCCESS [  0.064 s]
[INFO] seata-sqlparser-core 1.5.0-SNAPSHOT ................ SUCCESS [  0.245 s]
[INFO] seata-compressor 1.5.0-SNAPSHOT .................... SUCCESS [  0.061 s]
[INFO] seata-compressor-gzip 1.5.0-SNAPSHOT ............... SUCCESS [  0.218 s]
[INFO] seata-compressor-7z 1.5.0-SNAPSHOT ................. SUCCESS [  0.224 s]
[INFO] seata-compressor-bzip2 1.5.0-SNAPSHOT .............. SUCCESS [  0.224 s]
[INFO] seata-compressor-zip 1.5.0-SNAPSHOT ................ SUCCESS [  0.193 s]
[INFO] seata-compressor-lz4 1.5.0-SNAPSHOT ................ SUCCESS [  0.196 s]
[INFO] seata-compressor-deflater 1.5.0-SNAPSHOT ........... SUCCESS [  0.194 s]
[INFO] seata-compressor-all 1.5.0-SNAPSHOT ................ SUCCESS [  0.137 s]
[INFO] seata-sqlparser-druid 1.5.0-SNAPSHOT ............... SUCCESS [  1.207 s]
[INFO] seata-rm-datasource 1.5.0-SNAPSHOT ................. SUCCESS [  1.308 s]
[INFO] seata-sqlparser-antlr 1.5.0-SNAPSHOT ............... SUCCESS [  1.218 s]
[INFO] seata-tcc 1.5.0-SNAPSHOT ........................... SUCCESS [  0.378 s]
[INFO] seata-serializer 1.5.0-SNAPSHOT .................... SUCCESS [  0.083 s]
[INFO] seata-serializer-seata 1.5.0-SNAPSHOT .............. SUCCESS [  0.420 s]
[INFO] seata-serializer-protobuf 1.5.0-SNAPSHOT ........... SUCCESS [  8.367 s]
[INFO] seata-serializer-kryo 1.5.0-SNAPSHOT ............... SUCCESS [  0.209 s]
[INFO] seata-serializer-hessian 1.5.0-SNAPSHOT ............ SUCCESS [  0.201 s]
[INFO] seata-serializer-fst 1.5.0-SNAPSHOT ................ SUCCESS [  0.208 s]
[INFO] seata-serializer-all 1.5.0-SNAPSHOT ................ SUCCESS [  0.167 s]
[INFO] seata-spring 1.5.0-SNAPSHOT ........................ SUCCESS [  0.424 s]
[INFO] seata-grpc 1.5.0-SNAPSHOT .......................... SUCCESS [  3.191 s]
[INFO] seata-saga 1.5.0-SNAPSHOT .......................... SUCCESS [  0.078 s]
[INFO] seata-saga-processctrl 1.5.0-SNAPSHOT .............. SUCCESS [  0.296 s]
[INFO] seata-saga-statelang 1.5.0-SNAPSHOT ................ SUCCESS [  0.503 s]
[INFO] seata-saga-engine 1.5.0-SNAPSHOT ................... SUCCESS [  0.699 s]
[INFO] seata-saga-rm 1.5.0-SNAPSHOT ....................... SUCCESS [  0.252 s]
[INFO] seata-saga-tm 1.5.0-SNAPSHOT ....................... SUCCESS [  0.236 s]
[INFO] seata-saga-engine-store 1.5.0-SNAPSHOT ............. SUCCESS [  0.458 s]
[INFO] Seata All-in-one 1.5.0-SNAPSHOT .................... SUCCESS [  5.479 s]
[INFO] Seata bom 1.5.0-SNAPSHOT ........................... SUCCESS [  0.028 s]
[INFO] seata-config-all 1.5.0-SNAPSHOT .................... SUCCESS [  0.198 s]
[INFO] seata-discovery-all 1.5.0-SNAPSHOT ................. SUCCESS [  0.225 s]
[INFO] seata-metrics 1.5.0-SNAPSHOT ....................... SUCCESS [  0.060 s]
[INFO] seata-metrics-api 1.5.0-SNAPSHOT ................... SUCCESS [  0.207 s]
[INFO] seata-metrics-core 1.5.0-SNAPSHOT .................. SUCCESS [  0.198 s]
[INFO] seata-metrics-registry-compact 1.5.0-SNAPSHOT ...... SUCCESS [  0.241 s]
[INFO] seata-metrics-exporter-prometheus 1.5.0-SNAPSHOT ... SUCCESS [  0.239 s]
[INFO] seata-metrics-all 1.5.0-SNAPSHOT ................... SUCCESS [  0.142 s]
[INFO] seata-server 1.5.0-SNAPSHOT ........................ SUCCESS [  1.814 s]
[INFO] seata-distribution 1.5.0-SNAPSHOT .................. SUCCESS [  0.169 s]
[INFO] seata-test 1.5.0-SNAPSHOT .......................... SUCCESS [  0.288 s]
[INFO] seata-spring-boot-starter 1.5.0-SNAPSHOT ........... SUCCESS [  0.796 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  50.509 s
[INFO] Finished at: 2021-03-23T22:49:47+08:00
[INFO] ------------------------------------------------------------------------

server的jar包位于server/target目录下

原文地址:https://www.cnblogs.com/huiyao/p/14575531.html