Maven验证依赖关系的问题:Beam-sdks-java-io-google-cloud-platform

时间:2019-04-17 22:34:36

标签: maven google-cloud-platform google-cloud-dataflow apache-beam google-cloud-pubsub

我需要在我的maven项目中集成这种依赖关系:

  <!-- https://mvnrepository.com/artifact/org.apache.beam/beam-sdks-java-io-google-cloud-platform -->
        <dependency>
            <groupId>org.apache.beam</groupId>
            <artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
            <version>2.11.0</version>
        </dependency>

但是,当我尝试在项目中执行命令mvn verify时,出现错误提示:

enter image description here

感谢您的帮助!

更新

我包括了pubsub依赖项,例如:

<dependency>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-pubsub</artifactId>
    <version>1.69.0</version>
        <exclusions>
            <exclusion>
                <groupId>io.grpc</groupId>
                <artifactId>grpc-core</artifactId>
            </exclusion>
        </exclusions>
</dependency>

不幸的是,Beam提供的功能不适合我的项目。

2 个答案:

答案 0 :(得分:2)

您要描述的是Diamond Dependency problem

如果可以将相同版本的pubsub与beam一起使用,则不应有此冲突。根据Maven Central,beam-sdks-java-io-google-cloud-platform取决于grpc-google-cloud-pubsub-v1 1.43.0。

答案 1 :(得分:0)

我发现问题在于我对> df2 rn m7 Video.ID Rating 1 c1 NA m1 1 2 c2 NA m1 3 3 c3 1 m1 NA 4 c1 NA m3 2 5 c2 NA m3 NA 6 c3 1 m3 NA 7 c1 NA m5 1 8 c2 NA m5 3 9 c3 1 m5 NA 有依赖性:

pom.xml

但是如果我需要在同一个项目中使用这两个依赖关系,该怎么办?