编译 spring 3.2.13版本,一直报错,大家有什么解决方案吗

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':spring-orm-hibernate4'.

    Cannot change configuration ':spring-orm-hibernate4:runtimeMerge' after it has been resolved.

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

BUILD FAILED

:spring-aspects:compileJava
[ant:iajc] /home/tianshaokai/Project/JavaSE/workspace/3.2.13/spring-framework/spring-aspects/src/main/java/org/springframework/cache/aspectj/AnnotationCacheAspect.aj:1 [error] The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
[ant:iajc] (no source information available)
[ant:iajc] /home/tianshaokai/Project/JavaSE/workspace/3.2.13/spring-framework/spring-aspects/src/main/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] /home/tianshaokai/Project/JavaSE/workspace/3.2.13/spring-framework/spring-aspects/src/main/java/org/springframework/mock/staticmock/AbstractMethodMockingControl.aj:103 [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 '/home/tianshaokai/Project/JavaSE/workspace/3.2.13/spring-framework/spring-aspects/aspects.gradle' line: 37

  • 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

希望大神们给说一下 编译spring 步骤和方法,gradle 编译代码时不时就报错了,大神们有什么解决方案

阅读 8.1k
评论
    2 个回答
    dfgbh
    • 127

    数据库的锁机制和事务经常配合一起用

    评论 赞赏
      iMouseWu
      • 1.6k

      看下java的版本对不对。
      前段时间,刚好折腾了一段spring4,这里把一些遇到的坑和你讲一下,
      spring4,需要java8的环境,然后需要一个比较好的(能翻墙)环境,来下载jar包。
      spring4导入eclipse还需要groovy插件。
      最后终于在编译器里面不报错了。。

      评论 赞赏
        撰写回答

        登录后参与交流、获取后续更新提醒