编译spring-cloud-cli-2.2.1.RELEASE源码

  1. 下载spring-cloud-cli-2.2.1.RELEASE源码。

    1
    2
    3
    cd /home
    git config --global http.sslVerify false
    git clone https://github.com/spring-cloud/spring-cloud-cli.git
    

  2. 切换到指定版本。

    1
    2
    cd spring-cloud-cli
    git checkout v2.2.1.RELEASE
    

  3. CentOS 7.6&openEuler 20.03系统下需要添加spring-boot-thin-launcher-1.0.22.RELEASE-exec.jar包到库目录。

    1. 获取spring-boot-thin-launcher-1.0.22.RELEASE-exec.jar包。
      1
      wget https://jcenter.bintray.com/org/springframework/boot/experimental/spring-boot-thin-launcher/1.0.22.RELEASE/spring-boot-thin-launcher-1.0.22.RELEASE-exec.jar
      
    2. 创建目录。
      1
      mkdir -p /root/.m2/repository/org/springframework/boot/experimental/spring-boot-thin-launcher/1.0.22.RELEASE/
      
    3. 将获取的包复制到库目录下。
      1
      \cp spring-boot-thin-launcher-1.0.22.RELEASE-exec.jar /root/.m2/repository/org/springframework/boot/experimental/spring-boot-thin-launcher/1.0.22.RELEASE/
      

  4. 执行编译。

    1
    2
    cd /home/spring-cloud-cli/
    ./mvnw clean install -Dgpg.skip=true
    

    若显示BUILD SUCCESS,则编译通过。