构建具有Spring框架依赖关系的发行版

时间:2014-08-02 05:28:11

标签: java spring

我学习Spring开发并尝试在Github上的项目之后逐步配置Spring框架(网站是:https://github.com/spring-projects/spring-framework/wiki/Building-a-distribution-with-dependencies)。输入命令$ ./gradlew depsZipRun the depsZip gradle task后。以下信息显示失败:

:spring-aspects:compileJava
Download http://repo.springsource.org/libs-release/org/aspectj/aspectjrt/1.7.1/a
spectjrt-1.7.1.jar
[ant:iajc] C:\Users\Zihan\Documents\GitHub\spring-framework\spring-aspects\src\m
ain\java\org\springframework\beans\factory\aspectj\AbstractBeanConfigurerAspect.
aj:1 [error] The type java.lang.CharSequence cannot be resolved. It is indirectl
y referenced from required .class files
[ant:iajc] (no source information available)
[ant:iajc] C:\Users\Zihan\Documents\GitHub\spring-framework\spring-aspects\src\m
ain\java\org\springframework\mock\staticmock\AbstractMethodMockingControl.aj:19
[error] The import java.util.Arrays cannot be resolved
[ant:iajc] import java.util.Arrays;
[ant:iajc]        ^^^^^^^^^^^^^^^
[ant:iajc] C:\Users\Zihan\Documents\GitHub\spring-framework\spring-aspects\src\m
ain\java\org\springframework\mock\staticmock\AbstractMethodMockingControl.aj:87
[error] Arrays cannot be resolved
[ant:iajc] if (!Arrays.equals(this.args, args)) {
[ant:iajc]      ^
[ant:iajc]
[ant:iajc] 3 errors
:spring-aspects:compileJava FAILED

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\Zihan\Documents\GitHub\spring-framework\spring-aspects\aspects.
gradle' line: 30

* What went wrong:
Execution failed for task ':spring-aspects:compileJava'.
> compile errors: 3

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 42.798 secs
C:\Users\Zihan\Documents\GitHub\spring-framework [(abdcefb...)]>

可以帮助我解决配置问题。如果给予一些指导,我真的很感激。

提前致谢!

1 个答案:

答案 0 :(得分:0)

首先,为什么你不能使用像maven或gradle这样的依赖管理工具?在你的链接上我读了

  

虽然强烈建议Spring Framework用户利用Gradle,Maven和Ivy等构建系统的传递依赖管理功能,但有些团队无法使用这些工具。这通常是由于公司限制或使用旧版本

使用上面定义的工具简单地构建和弹簧项目的mantainence。然后从弹簧项目开始,您可以按照Building Spring Project

进行操作