【问题标题】:Failed to read artifact descriptor Spring Boot无法读取工件描述符 Spring Boot
【发布时间】:2017-08-20 01:54:41
【问题描述】:

我为spring-boot-starter-data-jpa 和spring-boot-starter-jdbc 添加了依赖项。我遇到了问题:“无法读取工件描述符......”

我下载了 jars 并在所有依赖项的文件夹中手动添加,我像引用的库一样添加了,但没有帮助。 有人可以帮我吗?

这是 pom.xml 的一部分:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.2.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

【问题讨论】:

    标签: java spring eclipse maven


    【解决方案1】:

    下载 jars 并手动添加不会添加依赖项和子依赖项。 pom也不会更新。 尝试删除以下文件夹

    org.springframework.boot:spring-boot-starter-jdbc 
    
    org.springframework.boot:spring-boot-starter-data-jpa
    

    从您的 maven 存储库 (.m2) 并刷新 maven 项目 (ALT + F5)。

    然后你可以得到你可以在这里发布的实际错误(如果存在)。

    【讨论】:

    • 如果您使用代理,您将面临这个问题。
    • @FaizanMubasher 你能解释一下“如果你在代理之后”是什么意思,解决方法是什么?
    【解决方案2】:

    解决这个问题非常简单。只需从 users/username/ 位置删除 .m2 文件夹并刷新 eclipse 工作区中的 maven 项目或删除项目并再次导入。

    【讨论】:

      猜你喜欢
      • 2016-05-08
      • 2011-10-02
      • 2017-02-12
      • 2011-07-03
      • 1970-01-01
      • 2017-08-02
      • 2018-10-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多