---
title: 编译spring-cloud-cli-2.2.1.RELEASE源码
description: "1. 下载spring-cloud-cli-2.2.1.RELEASE源码。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengwebs/ecosystemEnable/SpringCloud/kunpengspringcloudhoxton_02_0031.html
sourcePath: /source/zh/kunpengwebs/ecosystemEnable/SpringCloud/kunpengspringcloudhoxton_02_0031.html
indexId: 6bf8f5dbdf486455330aca6732030dac8c60e3aa85d64f899424f94d62fb056488
---
# 编译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包到库目录。

  a. 获取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

  b. 创建目录。
    1 mkdir -p /root/.m2/repository/org/springframework/boot/experimental/spring-boot-thin-launcher/1.0.22.RELEASE/

  c. 将获取的包复制到库目录下。
    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，则编译通过。

  编译安装spring-cloud-launcher-cli报错Caused by: java.net.UnknownHostException: repo.spring.io，参考spring-cloud-launcher-cli模块提示UnknownHostException的解决方法。 编译安装spring-cloud-launcher-cli报错java.lang.AssertionError，参考spring-cloud-launcher-cli模块提示AssertionError的解决方法。 编译安装spring-cloud-cli-integration-tests报错Caused by: java.net.UnknownHostException: repo.spring.io，参考spring-cloud-cli-integration-tests模块提示UnknownHostException的解决方法。 编译安装spring-cloud-cli-integration-tests报错Parent proxy unreacheable (502)，是网络问题多执行几次。 如果遇到spring-cloud-cli-integration-tests报错timeout，参考spring-cloud-cli异常问题timeout的解决方法。
