【问题标题】:Could not resolve all files for configuration ':compileClasspath'无法解析配置“:compileClasspath”的所有文件
【发布时间】:2023-03-04 03:01:02
【问题描述】:

我的项目分为4个模块

常见的https://pastebin.com/EiRL7Snk (build.gradle)

核心https://pastebin.com/n1b1xWMb (build.gradle)

网络https://pastebin.com/9CCrA9q0 (build.gradle)

应用程序https://pastebin.com/uEHZDrmQ (build.gradle)

以及项目https://pastebin.com/xbazbg5U的主要build.gradle文件

当您单击 app 模块的 build 按钮来构建应用程序时,我遇到了错误

* What went wrong:
Could not resolve all files for configuration ':common:compileClasspath'.
> Could not find com.fasterxml.jackson.core:jackson-databind:.
  Required by:
      project :common
> Could not find org.hibernate.validator:hibernate-validator:.
  Required by:
      project :common

在同步期间,例如

Warning:
    root project 'REST-Web-Services': Unable to resolve additional project configuration.
    Details: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':core:compile'.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find org.springframework.boot:spring-boot-starter-data-jpa:.
Required by:
    project :core

在 IntelliJ 中进入 Gradle 选项卡并显示模块的依赖关系后,我得到带下划线的错误依赖关系,没有版本

常见https://zapodaj.net/002015941d147.png.html

核心https://zapodaj.net/2c9929a99daed.png.html

网络https://zapodaj.net/db09241a806ad.png.html

导入这些依赖也不起作用https://zapodaj.net/5659d080d6a95.png.html

依赖项没有版本,因此会导致错误。到底是怎么回事。毕竟,我已经提供了存储库。如何解决?

【问题讨论】:

    标签: java spring spring-boot gradle


    【解决方案1】:

    普通项目没有对com.fasterxml.jackson.core:jackson-databind的依赖管理,所以io.spring.dependency-management插件无法在gradle尝试解析依赖之前设置版本

    【讨论】:

    猜你喜欢
    • 2023-02-13
    • 2019-05-10
    • 2019-03-05
    • 2021-12-05
    • 2021-11-15
    • 2019-05-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多