【问题标题】:Dependency convergence error while validating Hazelcast project验证 Hazelcast 项目时出现依赖收敛错误
【发布时间】:2021-08-18 19:10:43
【问题描述】:

“mvn clean validate”出现此错误。这个问题和https://github.com/googleapis/java-storage/issues/133一样吗?有人可以帮忙解决这个问题吗? 我没有更改 pom.xml。

Dependency convergence error for com.google.errorprone:error_prone_annotations:2.3.4 paths to dependency are:
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-grpc:5.0-20210531.092806-178
        +-io.grpc:grpc-netty-shaded:1.34.0
          +-io.grpc:grpc-core:1.34.0
            +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-grpc:5.0-20210531.092806-178
        +-io.grpc:grpc-protobuf:1.34.0
          +-io.grpc:grpc-protobuf-lite:1.34.0
            +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-grpc:5.0-20210531.092806-178
        +-io.grpc:grpc-protobuf:1.34.0
          +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-grpc:5.0-20210531.092806-178
        +-com.google.guava:guava:30.1.1-jre
          +-com.google.errorprone:error_prone_annotations:2.5.1
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-grpc:5.0-20210531.092806-178
        +-io.grpc:grpc-stub:1.34.0
          +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-grpc:5.0-20210531.092806-178
        +-io.grpc:grpc-api:1.34.0
          +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-files-gcs:5.0-20210531.093025-176
        +-com.google.cloud.bigdataoss:gcs-connector:hadoop3-2.1.5
          +-com.google.cloud.bigdataoss:gcsio:2.1.5
            +-io.grpc:grpc-auth:1.34.0
              +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-files-gcs:5.0-20210531.093025-176
        +-com.google.cloud.bigdataoss:gcs-connector:hadoop3-2.1.5
          +-com.google.cloud.bigdataoss:gcsio:2.1.5
            +-io.grpc:grpc-alts:1.34.0
              +-io.grpc:grpc-grpclb:1.34.0
                +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-files-gcs:5.0-20210531.093025-176
        +-com.google.cloud.bigdataoss:gcs-connector:hadoop3-2.1.5
          +-com.google.cloud.bigdataoss:gcsio:2.1.5
            +-io.grpc:grpc-alts:1.34.0
              +-com.google.errorprone:error_prone_annotations:2.3.4
    and
    +-com.hazelcast:hazelcast-distribution:5.0-SNAPSHOT
      +-com.hazelcast.jet:hazelcast-jet-files-gcs:5.0-20210531.093025-176
        +-com.google.cloud.bigdataoss:gcs-connector:hadoop3-2.1.5
          +-com.google.cloud.bigdataoss:gcsio:2.1.5
            +-com.google.protobuf:protobuf-java-util:3.13.0
              +-com.google.errorprone:error_prone_annotations:2.3.4
    
    [WARNING] Rule 1: org.apache.maven.plugins.enforcer.DependencyConvergence failed with message:
    Failed while enforcing releasability. See above detailed error message.
    

[错误] 无法在项目 hazelcast-distribution 上执行目标 org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce (enforce-tools):一些 Enforcer 规则失败。在上面查看解释规则失败原因的特定消息。 -> [帮助 1]

【问题讨论】:

  • 依赖收敛是企业需求吗?你用它做什么?
  • 没有要求,我也没有改pom.xml

标签: maven hazelcast


【解决方案1】:

您需要在 POM 中禁用 dependencyConvergence 检查,或者您需要在 POM 的 <dependencyManagement> 部分添加一个条目,其中包含您要使用的 error_prone_annotations 版本。

【讨论】:

  • 我在dependencyManagement 中添加了所有依赖项并且它起作用了,你的意思是只添加error_prone_annotations 吗?
  • 您可以添加所有这些。为了使依赖收敛起作用,你需要那些会产生收敛错误的。
猜你喜欢
  • 2016-08-12
  • 2023-03-31
  • 2016-09-24
  • 2018-01-05
  • 2015-09-19
  • 2021-10-29
  • 1970-01-01
  • 2018-03-02
  • 2012-01-19
相关资源
最近更新 更多