spring源码编译问题2
今天在编译源码时发现一些问题,如下
1. org.aspectj:aspectjweaver在编译时无法通过,是因为在仓库中找不到,可以将仓库位置变更为,如下所示:

2.发现 Circular dependency between the following tasks:
:spring-beans:compileGroovy
--- :spring-beans:compileJava
--- :spring-beans:compileKotlin
--- :spring-beans:compileGroovy (*)出现如下错误,导致编译无法通过修改spring-beans.gradle:如下
// This module also builds Kotlin code and the compileKotlin task naturally depends on
// compileJava. We need to redefine dependencies to break task cycles.
//将 spring-beans.gradle 最后三行:
//compileGroovy.dependsOn = compileGroovy.taskDependencies.values - "compileJava"
//compileKotlin.dependsOn(compileGroovy)
//compileKotlin.classpath += files(compileGroovy.destinationDir)
// 替换成:
def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - "compileJava"
compileKotlin.dependsOn(compileGroovy)
compileKotlin.classpath += files(compileGroovy.destinationDir)
// 就可以将spring-beans编译成功了。
3.出现
可通过找到出现问题的文件,直接使用下面的操作就解决了!

浙公网安备 33010602011771号