spring5.0.x源码编译完后,spring-beans项目运行compileTestJava报循环依赖错误,怎么解决?

qq_42283110 2019-10-19 03:03:52

Circular dependency between the following tasks:
:spring-beans:compileGroovy
\--- :spring-beans:compileJava
\--- :spring-beans:compileKotlin
\--- :spring-beans:compileGroovy (*)
...全文
1410 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Life_wy 2021-12-13
  • 打赏
  • 举报
回复

先编译spring-beans->tasks->other->compileGroovy,再编译oxm

wjheha 2021-01-02
  • 打赏
  • 举报
回复
// 从master分支copy的代码 tasks.named('compileGroovy') { // Groovy only needs the declared dependencies (and not the result of Java compilation) classpath = sourceSets.main.compileClasspath } tasks.named('compileKotlin') { // Kotlin also depends on the result of Groovy compilation classpath += files(sourceSets.main.groovy.classesDirectory) }
  • 打赏
  • 举报
回复
引用 3 楼 wxwrjgcs 的回复:
同问 我也遇到了 注释掉了spring-beans 里的 ,有解决吗?网上看到有3行都加注释,又会报错/spring-beans/src/main/kotlin/org/springframework/beans/factory/ListableBeanFactoryExtensions.kt: (67, 37): Unresolved reference: ListableBeanFactory
同问 怎么解决啊?
真正的张起灵 2020-03-30
  • 打赏
  • 举报
回复 1
引用 6 楼 Zzzj_1233 的回复:
修改spring-beans.spring-beans.gradle文件 修改最后三行为如下:

def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - "compileJava"
compileKotlin.dependsOn(compileGroovy)
compileKotlin.classpath += files(compileGroovy.destinationDir)
不错不错,你这个是对的
Zzzj_1233 2020-03-30
  • 打赏
  • 举报
回复 1
修改spring-beans.spring-beans.gradle文件 修改最后三行为如下:

def deps = compileGroovy.taskDependencies.immutableValues + compileGroovy.taskDependencies.mutableValues
compileGroovy.dependsOn = deps - "compileJava"
compileKotlin.dependsOn(compileGroovy)
compileKotlin.classpath += files(compileGroovy.destinationDir)
wxwrjgcs 2020-03-15
  • 打赏
  • 举报
回复
同问 我也遇到了 注释掉了spring-beans 里的 ,有解决吗?网上看到有3行都加注释,又会报错/spring-beans/src/main/kotlin/org/springframework/beans/factory/ListableBeanFactoryExtensions.kt: (67, 37): Unresolved reference: ListableBeanFactory
烟花易冷xyh 2020-03-15
  • 打赏
  • 举报
回复
Circular dependency between the following tasks: :spring-beans:compileGroovy \--- :spring-beans:compileJava \--- :spring-beans:compileKotlin \--- :spring-beans:compileGroovy (*) 一样的错误 你们怎么解决的啊
Tiangel5310 2019-11-17
  • 打赏
  • 举报
回复
同问 我也遇到了 注释掉了spring-beans 里的 也不行为啥呀

51,395

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧