当前位置: 代码迷 >> 综合 >> maven项目依赖出现Failed to read artifact descriptor for xxx
  详细解决方案

maven项目依赖出现Failed to read artifact descriptor for xxx

热度:58   发布时间:2023-11-27 01:32:46.0

问题描述

      在写springcloud项目的时候,A项目依赖B项目提示出现:Failed to read artifact descriptor for com.wxz:microblog:jar:0.0.1-SNAPSHOT,如下图所示:
在这里插入图片描述

解决办法

      找到被依赖的B项目,将pom文件中的dependencyManagement属性里面的dependencies属性里面的dependencyscope属性值改为compile,即

 <dependencyManagement><dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>${spring-cloud.version}</version><type>pom</type><scope>compile</scope></dependency></dependencies></dependencyManagement>

如下图所示:
在这里插入图片描述
      然后即可解决问题

  相关解决方案