使用 Git 下载 Spring 源码 编译 for Eclipse

使用 Git 下载 Spring 源码 编译 for Eclipse

 

1、安装gradle,下载 http://www.gradle.org/downloads

配置环境变量GRADLE_HOME,配置PATH  %GRADLE_HOME%/bin,cmd,gradle -v

 

2、spring4 用jdk8 下载 https://jdk8.java.net/download.html  配置环境变量

 

3、github 下载 https://windows.github.com/  

 

4、groovy 下载 http://groovy-lang.org/download.html 配置环境变量

 

5、打开git shell,切换工作目录(跟linux命令基本一致)

输入:git clone https://github.com/SpringSource/Spring-framework.git

等着吧!

 

6、进入下载的Spring-framework的目录找import-into-eclipse.bat,运行,导入eclipse

 

7、进入Spring-framework的目录 运行: gradlew :eclipse (注意冒号前面的空格),生成.classpath和.project

 

8、安装groovy插件,在eclipse的 Help -> Install New Software 中,添加groovy

下载: http://dist.springsource.org/milestone/GRECLIPSE/e4.4/

 

9、eclipse重启后,进入Spring-framework的目录 运行: gradlew :clean 

 

10、如果需要编译,运行gradlew :build

等着吧,一个个编译还是要点时间的。

编译有点问题

 

* What went wrong:

Could not resolve all dependencies for configuration ':spring-tx:compile'.

> Could not find com.ibm.websphere:uow:6.0.2.17.

  Searched in the following locations:

      https://repo1.maven.org/maven2/com/ibm/websphere/uow/6.0.2.17/uow-6.0.2.17

.pom

      https://repo1.maven.org/maven2/com/ibm/websphere/uow/6.0.2.17/uow-6.0.2.17

.jar

  Required by:

      org.springframework:spring-tx:4.2.0.BUILD-SNAPSHOT

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug

option to get more log output.

 

BUILD FAILED

 

 

FAILURE: Build failed with an exception.

 

* What went wrong:

Could not resolve all dependencies for configuration ':spring-test:compile'.

> Could not find testng.jar (org.testng:testng:6.9.4).

  Searched in the following locations:

      https://repo.spring.io/libs-release/org/testng/testng/6.9.4/testng-6.9.4.j

ar

 

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug

option to get more log output.

 

BUILD FAILED

 

 

http://ebr.springsource.com/repository/app/bundle/version/detail?name=com.springsource.com.ibm.websphere.uow&version=6.0.2.17

 

 

http://stackoverflow.com/questions/23564525/com-ibm-websphereuow6-0-2-17-not-found

猜你喜欢

转载自crabdave.iteye.com/blog/2224578