В настоящее время я использую apache луч 2.18.0 в GCP (Поток данных), и я хотел бы обновить его до 2.20.0
Проблема заключается в следующей ошибке, если я использую 2.20. 0 вместо 2.18.0 в моем файле pom:
Caused by: org.eclipse.aether.collection.UnsolvableVersionConflictException: Could not resolve version conflict among [com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-stub:jar:1.28.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-auth:jar:1.28.1 -> io.grpc:grpc-api:jar:[1.28.1,1.28.1], com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-protobuf:jar:1.28.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-protobuf:jar:1.28.1 -> io.grpc:grpc-protobuf-lite:jar:1.28.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.api:gax-grpc:jar:1.56.0 -> io.grpc:grpc-netty-shaded:jar:1.28.1 -> io.grpc:grpc-core:jar:[1.28.1,1.28.1] -> io.grpc:grpc-api:jar:[1.28.1,1.28.1], com.google.cloud:google-cloud-kms:jar:1.38.1 -> io.grpc:grpc-api:jar:1.28.1, com.google.cloud:google-cloud-datastore:jar:1.102.4 -> io.grpc:grpc-api:jar:1.28.1, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud:google-cloud-bigquerystorage:jar:0.120.1-beta -> io.grpc:grpc-api:jar:1.25.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> com.google.cloud:google-cloud-bigtable:jar:1.9.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> com.google.api.grpc:grpc-google-cloud-bigtable-v2:jar:1.9.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> com.google.api.grpc:grpc-google-cloud-bigtable-admin-v2:jar:1.9.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud.bigtable:bigtable-client-core:jar:1.13.0 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud:google-cloud-core-grpc:jar:1.92.2 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> com.google.cloud:google-cloud-spanner:jar:1.49.1 -> io.grpc:grpc-api:jar:1.26.0, org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.20.0 -> io.grpc:grpc-all:jar:1.25.0 -> io.grpc:grpc-api:jar:[1.25.0,1.25.0]]
Я видел другой вопрос с аналогичной проблемой, но я не вижу никакой связи с apache beam.
Какую зависимость я должен добавить или удалить?
Вот так выглядит мой pom-файл:
<modules>
...
</modules>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<beam.version>2.18.0</beam.version>
<maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
<maven-exec-plugin.version>1.6.0</maven-exec-plugin.version>
<maven-jar-plugin.version>3.1.2</maven-jar-plugin.version>
<slf4j.version>1.7.25</slf4j.version>
...
</properties>
<repositories>
...
</repositories>
<dependencyManagement>
...
</dependencyManagement>
<build>
<plugins>
...
</plugins>
<pluginManagement>
...
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.101.0</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
<version>1.49.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-kms</artifactId>
<version>1.34.0</version>
<exclusions>
<exclusion>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core-grpc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-datastore</artifactId>
<version>1.102.3</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
<version>${beam.version}</version>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
<exclusion>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</exclusion>
<exclusion>
<groupId>io.grpc</groupId>
<artifactId>grpc-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
<version>${beam.version}</version>
<exclusions>
<exclusion>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-jdbc</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>${beam.version}</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20190722</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${autovalue.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>${autovalue.annotations.version}</version>
</dependency>
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>postgres-socket-factory</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.12</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-api</artifactId>
<version>0.25.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
</dependencies>