Maven提示Failed to read artifact descriptor for xxx错误的解决

文章描述了在构建项目时遇到的Maven错误,无法读取多个artifact的描述符,如logback和fastjson等。问题源于maven尝试下载jar包但未能成功,因为这些依赖在私服仓库中缺失。解决方案是检查并修正maven的镜像设置,将mirror配置改为阿里云公共仓库的URL,以确保正确下载依赖。
摘要由CSDN通过智能技术生成

提示错误:

Failed to read artifact descriptor for ch.qos.logback:logback-classic:jar:1.2.3
Failed to read artifact descriptor for com.alibaba:fastjson:jar:1.2.47
Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.11.4
Failed to read artifact descriptor for com.fasterxml.jackson.core:jackson-databind:jar:2.9.6
Failed to read artifact descriptor for com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4
Failed to read artifact descriptor for com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4
Failed to read artifact descriptor for com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4
Failed to read artifact descriptor for commons-codec:commons-codec:jar:1.14
Failed to read artifact descriptor for jakarta.annotation:jakarta.annotation-api:jar:1.3.5
Failed to read artifact descriptor for javax.validation:validation-api:jar:2.0.1.Final
Failed to read artifact descriptor for org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3
Failed to read artifact descriptor for org.glassfish:jakarta.el:jar:3.0.3
Failed to read artifact descriptor for org.hibernate.validator:hibernate-validator:jar:6.1.7.Final
Failed to read artifact descriptor for org.projectlombok:lombok:jar:1.18.24
Failed to read artifact descriptor for org.slf4j:jul-to-slf4j:jar:1.7.30
Failed to read artifact descriptor for org.slf4j:slf4j-log4j12:jar:1.7.25
Failed to read artifact descriptor for org.yaml:snakeyaml:jar:1.26

原因:

maven下载jar包失败,可以在私服仓库下查看,没有jar包

解决:

maven配置文件setting.xml的mirror地址配置错误,重新配置,如下:

      <mirror>
          <id>aliyunmaven</id>
          <mirrorOf>*</mirrorOf>
          <name>阿里云公共仓库</name>
          <url>https://maven.aliyun.com/repository/public</url>
      </mirror>
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值