Gradle編譯Spring原始碼,並匯入Eclipse
阿新 • • 發佈:2018-11-11
1.Spring3.2.1原始碼
下載地址:https://github.com/spring-projects/spring-framework/releases/tag/v3.2.1.RELEASE
2.Gradle、JDK版本:Gradle 1.3 + JDK 1.7,之前試過 Gradle 4.2 + JDK 1.8沒成功
gradle -version
------------------------------------------------------------
Gradle 1.3
------------------------------------------------------------
Gradle build time: 2012年11月20日 星期二 上午11時37分38秒 UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_51 (Oracle Corporation 24.51-b03)
OS: Windows 8 6.2 amd64
安裝成功,在 dos下輸入 gradle -version, 會有上面的提示
3.cd 到原始碼目錄下,在執行 gradle cleanidea eclipse
出現上面的BUILD SUCCESSFUL就編譯成功了,即可以匯入Eclipse\spring-framework-3.2.1.RELEASE>gradle cleanidea eclipse :buildSrc:compileJava UP-TO-DATE :buildSrc:compileGroovy UP-TO-DATE :buildSrc:processResources UP-TO-DATE :buildSrc:classes UP-TO-DATE :buildSrc:jar UP-TO-DATE :buildSrc:assemble UP-TO-DATE :buildSrc:compileTestJava UP-TO-DATE :buildSrc:compileTestGroovy UP-TO-DATE :buildSrc:processTestResources UP-TO-DATE :buildSrc:testClasses UP-TO-DATE :buildSrc:test UP-TO-DATE :buildSrc:check UP-TO-DATE :buildSrc:build UP-TO-DATE The eclipseClasspath.downloadSources method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the eclipse.classpath.downloadSources method instead. :cleanIdeaModule UP-TO-DATE :cleanIdeaProject UP-TO-DATE :cleanIdea UP-TO-DATE :spring-aop:cleanIdeaModule UP-TO-DATE :spring-aop:cleanIdea UP-TO-DATE :spring-aspects:cleanIdeaModule UP-TO-DATE :spring-aspects:cleanIdea UP-TO-DATE :spring-beans:cleanIdeaModule UP-TO-DATE :spring-beans:cleanIdea UP-TO-DATE :spring-build-src:cleanIdeaModule UP-TO-DATE :spring-build-src:cleanIdea UP-TO-DATE :spring-context:cleanIdeaModule UP-TO-DATE :spring-context:cleanIdea UP-TO-DATE :spring-context-support:cleanIdeaModule UP-TO-DATE :spring-context-support:cleanIdea UP-TO-DATE :spring-core:cleanIdeaModule UP-TO-DATE :spring-core:cleanIdea UP-TO-DATE :spring-expression:cleanIdeaModule UP-TO-DATE :spring-expression:cleanIdea UP-TO-DATE :spring-instrument:cleanIdeaModule UP-TO-DATE :spring-instrument:cleanIdea UP-TO-DATE :spring-instrument-tomcat:cleanIdeaModule UP-TO-DATE :spring-instrument-tomcat:cleanIdea UP-TO-DATE :spring-jdbc:cleanIdeaModule UP-TO-DATE :spring-jdbc:cleanIdea UP-TO-DATE :spring-jms:cleanIdeaModule UP-TO-DATE :spring-jms:cleanIdea UP-TO-DATE :spring-orm:cleanIdeaModule UP-TO-DATE :spring-orm:cleanIdea UP-TO-DATE :spring-orm-hibernate4:cleanIdeaModule UP-TO-DATE :spring-orm-hibernate4:cleanIdea UP-TO-DATE :spring-oxm:cleanIdeaModule UP-TO-DATE :spring-oxm:cleanIdea UP-TO-DATE :spring-struts:cleanIdeaModule UP-TO-DATE :spring-struts:cleanIdea UP-TO-DATE :spring-test:cleanIdeaModule UP-TO-DATE :spring-test:cleanIdea UP-TO-DATE :spring-test-mvc:cleanIdeaModule UP-TO-DATE :spring-test-mvc:cleanIdea UP-TO-DATE :spring-tx:cleanIdeaModule UP-TO-DATE :spring-tx:cleanIdea UP-TO-DATE :spring-web:cleanIdeaModule UP-TO-DATE :spring-web:cleanIdea UP-TO-DATE :spring-webmvc:cleanIdeaModule UP-TO-DATE :spring-webmvc:cleanIdea UP-TO-DATE :spring-webmvc-portlet:cleanIdeaModule UP-TO-DATE :spring-webmvc-portlet:cleanIdea UP-TO-DATE :spring-webmvc-tiles3:cleanIdeaModule UP-TO-DATE :spring-webmvc-tiles3:cleanIdea UP-TO-DATE :eclipseClasspath :eclipseJdtPrepare :eclipseJdt :eclipseProject :eclipseSettings :eclipseWstComponent :eclipse :spring-aop:eclipseClasspath :spring-aop:eclipseJdtPrepare :spring-aop:eclipseJdt :spring-aop:eclipseProject :spring-aop:eclipseSettings :spring-aop:eclipseWstComponent :spring-aop:eclipse :spring-aspects:eclipseClasspath :spring-aspects:eclipseJdtPrepare :spring-aspects:eclipseJdt :spring-aspects:eclipseProject :spring-aspects:eclipseSettings :spring-aspects:eclipseWstComponent :spring-aspects:eclipse :spring-beans:eclipseClasspath :spring-beans:eclipseJdtPrepare :spring-beans:eclipseJdt :spring-beans:eclipseProject :spring-beans:eclipseSettings :spring-beans:eclipseWstComponent :spring-beans:eclipse :spring-build-src:eclipseClasspath :spring-build-src:eclipseJdtPrepare :spring-build-src:eclipseJdt :spring-build-src:eclipseProject :spring-build-src:eclipseSettings :spring-build-src:eclipseWstComponent :spring-build-src:eclipse :spring-context:eclipseClasspath :spring-context:eclipseJdtPrepare :spring-context:eclipseJdt :spring-context:eclipseProject :spring-context:eclipseSettings :spring-context:eclipseWstComponent :spring-context:eclipse :spring-context-support:eclipseClasspath :spring-context-support:eclipseJdtPrepare :spring-context-support:eclipseJdt :spring-context-support:eclipseProject :spring-context-support:eclipseSettings :spring-context-support:eclipseWstComponent :spring-context-support:eclipse :spring-core:eclipseClasspath :spring-core:eclipseJdtPrepare :spring-core:eclipseJdt :spring-core:eclipseProject :spring-core:eclipseSettings :spring-core:eclipseWstComponent :spring-core:eclipse :spring-expression:eclipseClasspath :spring-expression:eclipseJdtPrepare :spring-expression:eclipseJdt :spring-expression:eclipseProject :spring-expression:eclipseSettings :spring-expression:eclipseWstComponent :spring-expression:eclipse :spring-instrument:eclipseClasspath :spring-instrument:eclipseJdtPrepare :spring-instrument:eclipseJdt :spring-instrument:eclipseProject :spring-instrument:eclipseSettings :spring-instrument:eclipseWstComponent :spring-instrument:eclipse :spring-instrument-tomcat:eclipseClasspath :spring-instrument-tomcat:eclipseJdtPrepare :spring-instrument-tomcat:eclipseJdt :spring-instrument-tomcat:eclipseProject :spring-instrument-tomcat:eclipseSettings :spring-instrument-tomcat:eclipseWstComponent :spring-instrument-tomcat:eclipse :spring-jdbc:eclipseClasspath :spring-jdbc:eclipseJdtPrepare :spring-jdbc:eclipseJdt :spring-jdbc:eclipseProject :spring-jdbc:eclipseSettings :spring-jdbc:eclipseWstComponent :spring-jdbc:eclipse :spring-jms:eclipseClasspath :spring-jms:eclipseJdtPrepare :spring-jms:eclipseJdt :spring-jms:eclipseProject :spring-jms:eclipseSettings :spring-jms:eclipseWstComponent :spring-jms:eclipse :spring-orm:eclipseClasspath :spring-orm:eclipseJdtPrepare :spring-orm:eclipseJdt :spring-orm:eclipseProject :spring-orm:eclipseSettings :spring-orm:eclipseWstComponent :spring-orm:eclipse :spring-orm-hibernate4:eclipseClasspath :spring-orm-hibernate4:eclipseJdtPrepare :spring-orm-hibernate4:eclipseJdt :spring-orm-hibernate4:eclipseProject :spring-orm-hibernate4:eclipseSettings :spring-orm-hibernate4:eclipseWstComponent :spring-orm-hibernate4:eclipse :spring-oxm:eclipseClasspath :spring-oxm:eclipseJdtPrepare :spring-oxm:eclipseJdt :spring-oxm:eclipseProject :spring-oxm:eclipseSettings :spring-oxm:eclipseWstComponent :spring-oxm:eclipse :spring-struts:eclipseClasspath :spring-struts:eclipseJdtPrepare :spring-struts:eclipseJdt :spring-struts:eclipseProject :spring-struts:eclipseSettings :spring-struts:eclipseWstComponent :spring-struts:eclipse :spring-test:eclipseClasspath :spring-test:eclipseJdtPrepare :spring-test:eclipseJdt :spring-test:eclipseProject :spring-test:eclipseSettings :spring-test:eclipseWstComponent :spring-test:eclipse :spring-test-mvc:eclipseClasspath :spring-test-mvc:eclipseJdtPrepare :spring-test-mvc:eclipseJdt :spring-test-mvc:eclipseProject :spring-test-mvc:eclipseSettings :spring-test-mvc:eclipseWstComponent :spring-test-mvc:eclipse :spring-tx:eclipseClasspath :spring-tx:eclipseJdtPrepare :spring-tx:eclipseJdt :spring-tx:eclipseProject :spring-tx:eclipseSettings :spring-tx:eclipseWstComponent :spring-tx:eclipse :spring-web:eclipseClasspath :spring-web:eclipseJdtPrepare :spring-web:eclipseJdt :spring-web:eclipseProject :spring-web:eclipseSettings :spring-web:eclipseWstComponent :spring-web:eclipse :spring-webmvc:eclipseClasspath :spring-webmvc:eclipseJdtPrepare :spring-webmvc:eclipseJdt :spring-webmvc:eclipseProject :spring-webmvc:eclipseSettings :spring-webmvc:eclipseWstComponent :spring-webmvc:eclipse :spring-webmvc-portlet:eclipseClasspath :spring-webmvc-portlet:eclipseJdtPrepare :spring-webmvc-portlet:eclipseJdt :spring-webmvc-portlet:eclipseProject :spring-webmvc-portlet:eclipseSettings :spring-webmvc-portlet:eclipseWstComponent :spring-webmvc-portlet:eclipse :spring-webmvc-tiles3:eclipseClasspath :spring-webmvc-tiles3:eclipseJdtPrepare :spring-webmvc-tiles3:eclipseJdt :spring-webmvc-tiles3:eclipseProject :spring-webmvc-tiles3:eclipseSettings :spring-webmvc-tiles3:eclipseWstComponent :spring-webmvc-tiles3:eclipse BUILD SUCCESSFUL Total time: 30.551 secs