Compiling the spring-cloud-build-2.2.1.RELEASE Source Code
- Download the spring-cloud-build-2.2.1.RELEASE source code.
1 2 3
cd /home git config --global http.sslVerify false git clone https://github.com/spring-cloud/spring-cloud-build.git
- During the download, if a message is displayed stating "fatal: unable to access 'https://github.com/spring-cloud/spring-cloud-build.git/': Empty reply from server", the network of the code repository is unstable. Retry the download.
- If "Peer's Certificate issuer is not recognized" is reported during the download, perform 1 to 4 to resolve the problem.
- According to the Spring Cloud community, the source packages (in .zip or .tar.gz format) of Spring Cloud projects are used for source code sharing instead of building. Therefore, the source packages do not contain Git project files on which the building process depends. Errors may occur if the source packages are used to build Spring Cloud projects. Therefore, this document does not provide source code download addresses. Instead, the git command is used to clone the source code.
- Switch to the target version.
1 2
cd spring-cloud-build git checkout v2.2.1.RELEASE
- Adapt to ShellCheck of the ARM version.
- Open the build-helper.sh file.
1vim docs/src/test/bash/build-helper.sh - Press i to enter the insert mode and add the following content to the file:
- Modify line 23.
SHELLCHECK_VERSION="v0.7.0"

Shellcheck 0.7.0 and later versions support the ARM architecture.
- Modify line 29.
ARCH=`uname -m` SHELLCHECK_ARCHIVE="shellcheck-${SHELLCHECK_VERSION}.linux.${ARCH}.tar.xz"
- Modify line 36.
"https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION}/${SHELLCHECK_ARCHIVE}"
- Modify line 23.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the build-helper.sh file.
- Perform the compilation.
1mvn clean install -Dgpg.skip=true

If BUILD SUCCESS is displayed, the compilation is successful.
The solutions to the following problems apply to all projects in this document.
- The community has stated that if users want to build a release version by themselves, they need to skip the GPG check. If a GPG error is reported during the command execution, refer to Failed to Check GPG for the solution.
- If the error message "ERROR: cannot verify storage.googleapis.com's certificate" or "validity check failed" is reported during the compilation, perform the configuration by following instructions in Importing the Certificate.
- If "connection refused" is reported during the compilation, the network proxy is faulty. Retry the test command for several times.
- Compilation may fail due to the checkstyle-plugin check during project building. The same problem exists in the x86 environment. You do not need to perform the commit operation for all the projects in this document, therefore you can remove the plugin to resolve this problem. For details, see "Failed during checkstyle execution" Displayed When Compiling Spring Boot.
Parent topic: Compiling and Installing Spring Cloud