下载jdk1.8,我当时版本是1.7 ,为什么是1.8呢,等下就知道了,
window cmd 到具体的目录 进行编译gradle cleanIdea eclipse
等待出现BUILD SUCCESSFUL,表示执行成功
可是事与愿违,出现了与jdk有关的问题,
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\javaSourceCode\Spring\spring3.2\spring-framework-myeclipse\build.gradle' line: 67
* What went wrong:
A problem occurred evaluating root project 'spring'.
> java.lang.UnsupportedClassVersionError: io/spring/gradle/propdeps/PropDepsPlugin : Unsupported major.minor version 52.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
没有等来成功,却等来了失败。。。。。
网上查了一下,是jdk版本比较低:
参考http://blog.csdn.net/pipisorry/article/details/42965435
没办法,只有重新配置jdk1.8
OK,成功,之后继续开始执行,
重新执行第2步,继续执行gradle cleanIdea eclipse进行编译
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\javaSourceCode\Spring\spring3.2\spring-framework-myeclipse\spring-aspects\spring-aspects.gradle' line: 21
* What went wrong:
A problem occurred evaluating project ':spring-aspects'.
> No such property: outputDir for class: org.gradle.api.internal.file.DefaultSourceDirectorySet
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
MMP ,又不行,再次百度。
百度后发现是gradle的版本低,于是将3.5的改成4.2的,
再次重新执行第2步,继续执行gradle cleanIdea eclipse进行编译,下图代表正在执行编译,
gradle各版本下载地址:http://services.gradle.org/distributions
参考http://blog.csdn.net/xiongyouqiang/article/details/78388141?locationNum=4&fps=1
经过长时间的等待,终于出现想看到的结果了。BUILD SUCCESSFUL
查看编译过后的文件也变的熟悉了
由于到这之后还需要再走一步,在spring-oxm目录下执行
gradle cleanIdea :spring-oxm:compileTestJava
解决oxm的依赖问题,如果没有执行这步,则会在导入到MyEclipse中遇到下面那些问题。