Win10 + IDEA2019.3 source development environment to build Spring5.1.x

Native environment:

  • Win10 Home Edition 64
  • IDEA 2019.3.1
  • Spring 5.1.x
  • Gradle 5.6.4
  • Git 2.20.1

0, the compiler environment initialization

The environment described above are installed, configured environment variables:
GRADLE_HOME:
Here Insert Picture Description
GRADLE_USER_HOME:
Here Insert Picture Description
then look at Gradle version follows CMD means that the configuration is successful:
Here Insert Picture Description

1, Spring Source download

After I git clone cloud code this image down, switching to 5.1.x branch.

2, the compiler - Import sources

Spring-framework there is a source directory import IDEA documentation: == import-into-idea.md ==, reads as follows:

_Within your locally cloned spring-framework working directory:_

1. Precompile `spring-oxm` with `./gradlew :spring-oxm:compileTestJava`
2. Import into IntelliJ (File -> New -> Project from Existing Sources -> Navigate to directory -> Select build.gradle)
3. When prompted exclude the `spring-aspects` module (or after the import via File-> Project Structure -> Modules)
4. Code away

1, we cmd into this root directory, then to compile the spring-oxm this project, because other spring assembly will depend on this.
2, IDEA which import the root directory of the project:
Here Insert Picture Description
After selecting the Spring-framework directory, select Import way Gradle, then click finish:
Here Insert Picture Description

3, and then click File - Project Structure into modules which exclude the Spring-aspect catalog:
Here Insert Picture Description

5, then, Gradle modify the configuration file, the modified version is 5.6.4:
D: \ Study \ the Spring-Framework-5.1.x-gitee \ the Spring-Framework \ Gradle \ wrapper \ gradle-wrapper.properties

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=file\:/D:/DevEnv/gradle-5.6.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

== distributionUrl value of this parameter to point to your local downloaded zip package path 5.6.4 ==

Gradle also modify Cache.properties inside the corresponding version:
D: \ Study \ the Spring-Framework-5.1.x-gitee \ the Spring-Framework.gradle \ buildOutputCleanup \ cache.properties
Here Insert Picture Description
Then, configure Gradle in IDEA inside for your own version:
Here Insert Picture Description

Finally, IDEA which opens a terminal Terminate, enter the command to compile:
Here Insert Picture Description

After == compiled, IDEA will automatically create resource index project, and then expand the project directory, the directory of all the Spring Package, the file folder icon to the left of the lower right corner there are the blue logo, the logo was compiled = =
Here Insert Picture Description

Guess you like

Origin www.cnblogs.com/xiaocy66/p/12442519.html