http://www.gradle.org/docs/current/userguide/userguide_single.html#installation
import-into-eclipse.bat 双击
E:\Mydocument\workandlive\src\opensource\v3.2.4.RELEASE\spring-context\src\test\java\org\springframework\aop\target\CommonsPoolTargetSourceTests.java:26: 错误: 程序包org.apache.commons.pool.impl不存在
import org.apache.commons.pool.impl.GenericObjectPool;^
E:\Mydocument\workandlive\src\opensource\v3.2.4.RELEASE\spring-context\src\test\java\org\springframework\aop\target\CommonsPoolTargetSourceTests.java:209: 错误: 找不到符号
assertEquals(GenericObjectPool.WHEN_EXHAUSTED_BLOCK, targetSource.getWhenExhaustedAction());
打开build.gradle,定位到如下位置
project("spring-context") {
然后在
testCompile("javax.inject:javax.inject-tck:1")这句话后面加上如下内容:
testCompile("commons-pool:commons-pool:1.5.3")
重新编译即可。
来源 http://forum.spring.io/forum/spring-projects/container/748940-building-spring-from-v3-2-5-release-tag
本文介绍了如何构建Spring 3.2.4.RELEASE的源代码,特别提到了在Eclipse中遇到的CommonsPoolTargetSourceTests.java的错误。通过双击import-into-eclipse.bat导入项目,并在build.gradle文件中添加缺失的commons-pool依赖,如testCompile('commons-pool:commons-pool:1.5.3'),来解决程序包不存在的问题。参考链接来自Spring官方论坛。
160

被折叠的 条评论
为什么被折叠?



