我学习了Spring开发,并按照Github上的一个项目一步一步地尝试配置Spring框架(网站是:https://github.com/spring-projects/spring-framework/wiki/Building-a-distribution-with-dependencies)。在键入命令$ ./gradlew depsZip to Run 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...)]>能帮我解决配置问题吗?如果能给我一些指导,我会很感激的。
提前感谢!
发布于 2014-08-02 16:32:16
首先,为什么你不能使用像maven或gradle这样的依赖管理工具?在你的链接上我读到
虽然强烈建议Spring Framework用户利用Gradle、Maven和Ivy等构建系统的可传递依赖项管理功能,但有些团队无法使用这些工具。这通常是由于公司的限制或使用遗留版本造成的
使用上面定义的工具,简单地构建和维护一个spring项目。然后,要开始一个spring项目,您可以遵循下面的Building Spring Project
https://stackoverflow.com/questions/25091978
复制相似问题