开发者社区> 问答> 正文

为什么Gradle 5(5.6.3)在组件解析期间做出了意外决定?

我有一个非常大的多项目Java构建。更新到Gradle 5(4.10.3-> 5.6.3)之后,最可怕的事情之一是在依赖关系解析期间发生了意外故障:

...
dependencies {
// I know about the deprecation of 'compile', with 'implementation' I have the same problems
    compile project(":Monitor")
    compile project(":WFPlugins-Server")
    compile project(":web-spring")
    compile project(":Security")
    compile project(":Client")
}
...

对我来说,很明显,这应该是项目依赖性。但我收到:

FAILURE: Build failed with an exception.



* What went wrong:

Execution failed for task ':SpringWFS:compileJava'.

> Could not resolve all files for configuration ':SpringWFS:compileClasspath'.
   > Could not find com.company:WFPlugins-Server:1.12.

     Required by:
         project :SpringWFS

因此,gradle尝试将其解析为ExternalModuleDependency(就gradle而言),而不是DefaultProjectDependency,并且构建按预期失败

有人解决了这个问题吗?

备注:

请不要提出复合版本(目前无法实现,但我正在努力) 更改构建系统(我们有一个非常大的项目):)

展开
收起
垚tutu 2019-12-04 16:23:28 895 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
弹性创造价值:基于ECS的最佳性价比实践解析 立即下载
又快又稳:阿里云下一代虚拟交换机解析 立即下载
从理论到实践,深度解析MySQL Group Replication 立即下载

相关镜像