找不到工件 com.wavefront:wavefront-spring-boot-bom:pom:2.1.1-SNAPSHOT

问题描述

我使用 spring-cloud-sleuth-otel-autoconfigure 依赖项进行分布式跟踪。在 mvn clean install -X 时出错 实际错误消息是 Could not find artifact com.wavefront:wavefront-spring-boot-bom:pom:2.1.1-SNAPSHOT in xxxxSnapshots 我正在使用 .m2 文件夹中的 settings.xml 文件

我试图排除这些 wavefront-spring-boot-bom 依赖项。但我无法看到构建失败的 mvn dependency:tree bcs。这是回购链接..https://repo.grails.org/grails/core/org/springframework/cloud/spring-cloud-sleuth-otel-dependencies/1.0.0-M7/ 这正是我添加内容

 <dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-sleuth-otel-autoconfigure</artifactId>
    <version>1.0.0-M7</version>
    <exclusions>
    <exclusion>
    <groupId>com.wavefront</groupId>
    <artifactId>wavefront-spring-boot-bom</artifactId>
    </exclusion>
    </exclusions>
</dependency>
<repositories>
    <repository>
    <id>grails</id>
    <name>grails</name>
    <url>https://repo.grails.org/grails/core/</url>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
</repository>
<repository>
    <id>grails-plugins</id>
    <name>grails-plugins</name>
    <url>https://repo.grails.org/grails/plugins</url>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
</repository>
</repositories>

我该如何解决这个问题?

解决方法

请您尝试以下操作:

  1. 转到 https://start.spring.io 并使用 sleuth 生成项目
  2. 跟随 documentation 并添加 Sleuth-OTel(不包括 Brave)
  3. 请使用官方存储库(请参阅上面的文档)而不是第三方存储库

两个额外的提示:

  1. 使用 mvn verify 而不是 mvn clean install
  2. OTel 仍处于 Alpha 阶段,不打算用于生产(这就是为什么 SLeuth-OTel 是一个孵化器项目)