1. Download Spring Source
2. Download the installation Gradle, configure the environment variables (need to have a Java environment)
3. Execute the command under the Spring subproject: Gradle Cleanidea Eclipse, the corresponding. Project and. classpath files are generated
4.eclipse Importing Project
The first and second steps do not have to be said, in the third step encountered a following problem:
The error report should mean that the arguments to the constructor simultaneous that called Projectdependency do not match the definition. Fortunately, the report says where to call: Ide.gradle line:24, found this place in the Spring directory:
Obviously the parameter passed in when creating the object does not match the definition of the constructor, and it is known that the class is defined by Gradle, so we can confirm how the next Gradle defines the class.
Need to download gradle full-volume package, in the SRC directory can find the corresponding source code, so find the definition of this class:
As you can see, the constructor simply passes a path, and the meaning of this annotation should be the path at which the parameter is passed.
This time hold to try the mentality will, the parameter project (": ${projectname}"). After the path is removed, re-execute the command, luckily, the problem is gone ... Build successful.
This place suspects that Gradle has updated the function definition, but spring has not updated the script. Maybe they use a different version of Gradle than mine. My local is gradle-4.0.
This problem, in fact, is the script is wrong, according to the prompt to find the corresponding class definition know what parameters should be passed. In fact, a little more careful will find git up and down the source is used by the gradle-3.5 to build.
Problem. Spring source conversion to eclipse problems