Rate This Document
Findability
Accuracy
Completeness
Readability

Compiling and Installing Spring Framework

  1. Download the Spring Framework source code.
    1
    2
    3
    cd /home
    git config --global http.sslVerify false
    git clone https://github.com/spring-projects/spring-framework.git
    

    If the git clone command fails to be executed, replace github.com with github.com.cnpmjs.org.

  2. Go to the source code directory and switch to the specified version. (v5.2.x can be v5.2.2 or v5.2.6.)
    1
    2
    cd spring-framework
    git checkout v5.2.x.RELEASE
    
  3. Configure Gradle.
    1. Open the gradle-wrapper.properties file.
      1
      vim gradle/wrapper/gradle-wrapper.properties
      
    2. Press i to go to the insert mode, comment out line 3, and add the following content to line 4:
      distributionUrl=gradle-5.6.4-bin.zip

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
    4. Download the Gradle source code.
      1
      wget https://services.gradle.org/distributions/gradle-5.6.4-bin.zip --no-check-certificate
      
    5. Move the gradle-5.6.4-bin.zip source package to the gradle/wrapper/ directory.
      1
      mv gradle-5.6.4-bin.zip gradle/wrapper/
      
  4. Optional: Configure Cntlm.

    If a proxy is required for the server to access the Internet, configure Cntlm. For details, see Configuring Cntlm.

  5. Perform the compilation.
    cd /home/spring-framework
    ./gradlew build

    If BUILD SUCCESSFUL is displayed, the compilation is successful.

    On CentOS 7.6/openEuler 20.03:

    On CentOS 8.1: