Skip to content

Bad dependency for google-cloud-logging vs google-cloud-datastore #2050

Description

@gregw

For https://github.com/GoogleCloudPlatform/jetty-runtime we are trying to use both google-cloud-logging and google-cloud-datastore, but there appears to be incompatible dependencies.

With a simple pom like:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <name>Google Cloud Example</name>
  <groupId>org.acme</groupId>
  <version>1.0.0</version>
  <artifactId>example</artifactId>
  <packaging>jar</packaging>

  <dependencies>
    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>google-cloud-logging</artifactId>
      <version>1.0.1</version>
    </dependency>
  </dependencies>
</project>

we get the following dependency:tree:

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ example ---
[INFO] org.acme:example:jar:1.0.0
[INFO] \- com.google.cloud:google-cloud-logging:jar:1.0.1:compile
[INFO]    +- io.netty:netty-tcnative-boringssl-static:jar:1.1.33.Fork26:compile
[INFO]    +- com.google.cloud:google-cloud-core:jar:1.0.1:compile
[INFO]    |  +- com.google.guava:guava:jar:19.0:compile
[INFO]    |  +- joda-time:joda-time:jar:2.9.2:compile
[INFO]    |  +- org.json:json:jar:20160810:compile
[INFO]    |  +- com.google.api:api-common:jar:1.0.0:compile
[INFO]    |  +- com.google.api:gax:jar:1.0.0:compile
[INFO]    |  +- com.google.protobuf:protobuf-java-util:jar:3.2.0:compile
[INFO]    |  |  \- com.google.code.gson:gson:jar:2.7:compile
[INFO]    |  +- com.google.api.grpc:proto-google-common-protos:jar:0.1.9:compile
[INFO]    |  \- com.google.api.grpc:proto-google-iam-v1:jar:0.1.9:compile
[INFO]    +- com.google.cloud:google-cloud-core-grpc:jar:1.0.1:compile
[INFO]    |  +- com.google.protobuf:protobuf-java:jar:3.2.0:compile
[INFO]    |  \- io.grpc:grpc-protobuf:jar:1.2.0:compile
[INFO]    |     \- io.grpc:grpc-protobuf-lite:jar:1.2.0:compile
[INFO]    +- com.google.api:gax-grpc:jar:0.16.0:compile
[INFO]    |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.4.0:compile
[INFO]    |  |  +- com.google.http-client:google-http-client:jar:1.19.0:compile
[INFO]    |  |  |  \- org.apache.httpcomponents:httpclient:jar:4.0.1:compile
[INFO]    |  |  |     +- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO]    |  |  |     +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    |  |  |     \- commons-codec:commons-codec:jar:1.3:compile
[INFO]    |  |  \- com.google.http-client:google-http-client-jackson2:jar:1.19.0:compile
[INFO]    |  |     \- com.fasterxml.jackson.core:jackson-core:jar:2.1.3:compile
[INFO]    |  +- com.google.auto.value:auto-value:jar:1.2:compile
[INFO]    |  +- org.threeten:threetenbp:jar:1.3.3:compile
[INFO]    |  \- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO]    +- com.google.api.grpc:proto-google-cloud-logging-v2:jar:0.1.9:compile
[INFO]    +- io.grpc:grpc-netty:jar:1.2.0:compile
[INFO]    |  +- io.grpc:grpc-core:jar:1.2.0:compile (version selected from constraint [1.2.0,1.2.0])
[INFO]    |  |  +- com.google.errorprone:error_prone_annotations:jar:2.0.11:compile
[INFO]    |  |  +- io.grpc:grpc-context:jar:1.2.0:compile
[INFO]    |  |  \- com.google.instrumentation:instrumentation-api:jar:0.3.0:compile
[INFO]    |  +- io.netty:netty-codec-http2:jar:4.1.8.Final:compile (version selected from constraint [4.1.8.Final,4.1.8.Final])
[INFO]    |  |  +- io.netty:netty-codec-http:jar:4.1.8.Final:compile
[INFO]    |  |  |  \- io.netty:netty-codec:jar:4.1.8.Final:compile
[INFO]    |  |  \- io.netty:netty-handler:jar:4.1.8.Final:compile
[INFO]    |  |     \- io.netty:netty-buffer:jar:4.1.8.Final:compile
[INFO]    |  |        \- io.netty:netty-common:jar:4.1.8.Final:compile
[INFO]    |  \- io.netty:netty-handler-proxy:jar:4.1.8.Final:compile
[INFO]    |     +- io.netty:netty-transport:jar:4.1.8.Final:compile
[INFO]    |     |  \- io.netty:netty-resolver:jar:4.1.8.Final:compile
[INFO]    |     \- io.netty:netty-codec-socks:jar:4.1.8.Final:compile
[INFO]    +- io.grpc:grpc-stub:jar:1.2.0:compile
[INFO]    \- io.grpc:grpc-auth:jar:1.2.0:compile
[INFO]       \- com.google.auth:google-auth-library-credentials:jar:0.4.0:compile

Note that 0.4.0 version of com.google.auth:google-auth-library-oauth2-http:jar

The google-cloud-datastore version depends instead on 0.6.1 as you can see in the following dependency:tree:

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ example ---
[INFO] org.acme:example:jar:1.0.0
[INFO] \- com.google.cloud:google-cloud-datastore:jar:1.0.1:compile
[INFO]    +- com.google.cloud:google-cloud-core:jar:1.0.1:compile
[INFO]    |  +- com.google.guava:guava:jar:19.0:compile
[INFO]    |  +- joda-time:joda-time:jar:2.9.2:compile
[INFO]    |  +- org.json:json:jar:20160810:compile
[INFO]    |  +- com.google.api:api-common:jar:1.0.0:compile
[INFO]    |  |  +- com.google.auto.value:auto-value:jar:1.1:compile
[INFO]    |  |  \- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO]    |  +- com.google.api:gax:jar:1.0.0:compile
[INFO]    |  |  \- org.threeten:threetenbp:jar:1.3.3:compile
[INFO]    |  +- com.google.protobuf:protobuf-java-util:jar:3.2.0:compile
[INFO]    |  |  \- com.google.code.gson:gson:jar:2.7:compile
[INFO]    |  +- com.google.api.grpc:proto-google-common-protos:jar:0.1.9:compile
[INFO]    |  \- com.google.api.grpc:proto-google-iam-v1:jar:0.1.9:compile
[INFO]    +- com.google.cloud:google-cloud-core-http:jar:1.0.1:compile
[INFO]    |  +- com.google.auth:google-auth-library-credentials:jar:0.6.1:compile
[INFO]    |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.6.1:compile
[INFO]    |  |  \- com.google.http-client:google-http-client-jackson2:jar:1.19.0:compile
[INFO]    |  |     \- com.fasterxml.jackson.core:jackson-core:jar:2.1.3:compile
[INFO]    |  +- com.google.http-client:google-http-client:jar:1.21.0:compile
[INFO]    |  |  \- org.apache.httpcomponents:httpclient:jar:4.0.1:compile
[INFO]    |  |     +- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO]    |  |     +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO]    |  |     \- commons-codec:commons-codec:jar:1.3:compile
[INFO]    |  +- com.google.oauth-client:google-oauth-client:jar:1.21.0:compile
[INFO]    |  +- com.google.api-client:google-api-client:jar:1.21.0:compile
[INFO]    |  +- com.google.http-client:google-http-client-appengine:jar:1.21.0:compile
[INFO]    |  \- com.google.http-client:google-http-client-jackson:jar:1.21.0:compile
[INFO]    |     \- org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO]    +- com.google.cloud.datastore:datastore-v1-protos:jar:1.3.0:compile
[INFO]    |  \- com.google.protobuf:protobuf-java:jar:3.0.0:compile
[INFO]    +- com.google.cloud.datastore:datastore-v1-proto-client:jar:1.3.0:compile
[INFO]    |  \- com.google.http-client:google-http-client-protobuf:jar:1.20.0:compile
[INFO]    \- com.google.api.grpc:grpc-google-common-protos:jar:0.1.9:compile
[INFO]       +- io.grpc:grpc-stub:jar:1.2.0:compile
[INFO]       |  \- io.grpc:grpc-core:jar:1.2.0:compile
[INFO]       |     +- com.google.errorprone:error_prone_annotations:jar:2.0.11:compile
[INFO]       |     +- io.grpc:grpc-context:jar:1.2.0:compile
[INFO]       |     \- com.google.instrumentation:instrumentation-api:jar:0.3.0:compile
[INFO]       \- io.grpc:grpc-protobuf:jar:1.2.0:compile
[INFO]          \- io.grpc:grpc-protobuf-lite:jar:1.2.0:compile

If a pom lists both datastore and logging dependencies, for some reason the 0.4.0 version is picked, which fails to work with datastore (@janbartel can you comment with the exception you are getting).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.api: loggingIssues related to the Cloud Logging API.dependenciespriority: p0Highest priority. Critical issue. P0 implies highest priority.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions