spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
705 stars 693 forks source link

NoSuchMethodError when using Spring Cloud Sleuth #1735

Closed Alos closed 2 years ago

Alos commented 5 years ago

I've started to see the following when I start my applications:

 java.lang.NoSuchMethodError: io.opencensus.tags.TagContextBuilder.putPropagating(Lio/opencensus/tags/TagKey;Lio/opencensus/tags/TagValue;)Lio/opencensus/tags/TagContextBuilder;
    at io.grpc.internal.CensusStatsModule$ClientCallTracer.<init>(CensusStatsModule.java:359) ~[grpc-core-1.21.0.jar:1.21.0]
    at io.grpc.internal.CensusStatsModule.newClientCallTracer(CensusStatsModule.java:146) ~[grpc-core-1.21.0.jar:1.21.0]
    at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:689) ~[grpc-core-1.21.0.jar:1.21.0]
    at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156) ~[grpc-api-1.21.0.jar:1.21.0]
    at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:814) ~[grpc-core-1.21.0.jar:1.21.0]
    at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63) ~[grpc-core-1.21.0.jar:1.21.0]
    at zipkin2.reporter.stackdriver.internal.UnaryClientCall.<init>(UnaryClientCall.java:34) ~[zipkin-sender-stackdriver-0.9.0.jar:na]
    at zipkin2.reporter.stackdriver.StackdriverSender$PatchTracesCall.<init>(StackdriverSender.java:170) ~[zipkin-sender-stackdriver-0.9.0.jar:na]
    at zipkin2.reporter.stackdriver.StackdriverSender.sendSpans(StackdriverSender.java:146) ~[zipkin-sender-stackdriver-0.9.0.jar:na]
    at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.flush(AsyncReporter.java:286) ~[zipkin-reporter-2.7.13.jar:na]
    at zipkin2.reporter.AsyncReporter$Builder$1.run(AsyncReporter.java:190) ~[zipkin-reporter-2.7.13.jar:na]

 Exception in thread "AsyncReporter{StackdriverSender{louhi-test}}" java.lang.NoSuchMethodError: io.opencensus.tags.TagContextBuilder.putPropagating(Lio/opencensus/tags/TagKey;Lio/opencensus/tags/TagValue;)Lio/opencensus/tags/TagContextBuilder;
    at io.grpc.internal.CensusStatsModule$ClientCallTracer.<init>(CensusStatsModule.java:359)
    at io.grpc.internal.CensusStatsModule.newClientCallTracer(CensusStatsModule.java:146)
    at io.grpc.internal.CensusStatsModule$StatsClientInterceptor.interceptCall(CensusStatsModule.java:689)
    at io.grpc.ClientInterceptors$InterceptorChannel.newCall(ClientInterceptors.java:156)
    at io.grpc.internal.ManagedChannelImpl.newCall(ManagedChannelImpl.java:814)
    at io.grpc.internal.ForwardingManagedChannel.newCall(ForwardingManagedChannel.java:63)
    at zipkin2.reporter.stackdriver.internal.UnaryClientCall.<init>(UnaryClientCall.java:34)
    at zipkin2.reporter.stackdriver.StackdriverSender$PatchTracesCall.<init>(StackdriverSender.java:170)
    at zipkin2.reporter.stackdriver.StackdriverSender.sendSpans(StackdriverSender.java:146)
    at zipkin2.reporter.AsyncReporter$BoundedAsyncReporter.flush(AsyncReporter.java:286)
    at zipkin2.reporter.AsyncReporter$Builder$1.run(AsyncReporter.java:190)

My applications use:

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-trace</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-logging</artifactId>
    </dependency>

I saw this with spring-cloud-gcp-dependencies 1.0.0 and with 1.2.0.M1

meltsufin commented 5 years ago

I can't reproduce this. There's probably something here with version conflicts, but we'll need a complete pom.xml to debug.

Alos commented 5 years ago

Here is the parent POM:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.1.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <java.version>11</java.version>

    <!-- Dependency versions -->
    <versions.errorprone>2.3.3</versions.errorprone>
    <versions.gracefulshutdown>2.0</versions.gracefulshutdown>
    <versions.guava>27.1-jre</versions.guava>
    <versions.jacoco>0.8.2</versions.jacoco>
    <versions.jib>1.0.2</versions.jib>
    <versions.lombok>1.18.8</versions.lombok>
    <versions.spring-cloud-gcp>1.2.0.M1</versions.spring-cloud-gcp>
    <versions.spring-cloud>Greenwich.RELEASE</versions.spring-cloud>
    <versions.swagger>2.9.2</versions.swagger>
    <versions.truth>0.44</versions.truth>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-core</artifactId>
    </dependency>

    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-prometheus</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes-config</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-trace</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-logging</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.sbb</groupId>
      <artifactId>springboot-graceful-shutdown</artifactId>
      <version>${versions.gracefulshutdown}</version>
    </dependency>

    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger2</artifactId>
      <version>${versions.swagger}</version>
    </dependency>

    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger-ui</artifactId>
      <version>${versions.swagger}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes-ribbon</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-openfeign</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${versions.guava}</version>
    </dependency>

    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>${versions.truth}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.truth.extensions</groupId>
      <artifactId>truth-java8-extension</artifactId>
      <version>${versions.truth}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${versions.spring-cloud}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-gcp-dependencies</artifactId>
        <version>${versions.spring-cloud-gcp}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

The <build> does not have anything fancy except for some Jib and error prone configuration. The application is running in GKE. Here is the child pom.xml:

<properties>
    <versions.objectify>6.0.2</versions.objectify>
    <versions.kms>1.2.0</versions.kms>
    <versions.containeranalysis>0.98.0-beta</versions.containeranalysis>
  </properties>

<dependencies>
    <dependency>
      <groupId>com.googlecode.objectify</groupId>
      <artifactId>objectify</artifactId>
      <version>${versions.objectify}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-pubsub</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>google-cloud-containeranalysis</artifactId>
      <version>${versions.containeranalysis}</version>
    </dependency>

    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>google-cloud-kms</artifactId>
      <version>${versions.kms}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-storage</artifactId>
    </dependency>

  </dependencies>
suztomo commented 5 years ago

I tried reproducing the dependency tree (github repository). Here is the dependency tree that gets opencensus-api 0.15.

image

meltsufin commented 5 years ago

So objectify is bringing in an old version of datastore and open census.

Alos commented 5 years ago

Negative. Objectify was already in my POM long before any changes. I think the changes are related to the google-cloud-containeranalysis

To solve this problem for now I added:

    <dependency>
    <groupId>io.opencensus</groupId>
    <artifactId>opencensus-api</artifactId>
    <version>0.23.0</version>

to my POM file.

suztomo commented 5 years ago

@Alos Would you share the output of "mvn dependency:tree" as a gist for the problematic case? Is it possible for you to create a GitHub repository that reproduces the issue?

(I've been thinking about Maven dependency resolution as the culprit, but it could be Jib that picks up the dependency (link); I may need to learn how Jib resolves dependencies. Note that Jib's latest version is 1.3.0.)

Alos commented 5 years ago

Here is the portion of the relevant dependency tree:

[INFO] com.google.cloud.releng.louhi:artifact-service:jar:0.0.1-SNAPSHOT
[INFO] +- com.googlecode.objectify:objectify:jar:6.0.2:compile
[INFO] |  \- com.google.cloud:google-cloud-datastore:jar:1.59.0:compile
[INFO] |     \- com.google.cloud:google-cloud-core-http:jar:1.59.0:compile
[INFO] |        \- io.opencensus:opencensus-contrib-http-util:jar:0.15.0:compile
[INFO] +- com.google.cloud:google-cloud-containeranalysis:jar:0.98.0-beta:compile
[INFO] |  \- io.grpc:grpc-netty-shaded:jar:1.21.0:compile
[INFO] |     \- io.grpc:grpc-core:jar:1.21.0:compile (version selected from constraint [1.21.0,1.21.0])
[INFO] |        \- io.opencensus:opencensus-contrib-grpc-metrics:jar:0.21.0:compile
[INFO] \- io.opencensus:opencensus-api:jar:0.23.0:compile
suztomo commented 5 years ago

@Alos I assume it's not a problematic case because it picks up opencensus-api 0.23.0 as a direct dependency. Would you share the entire output of "mvn dependency:tree" as a gist for the problematic case where you did not explicitly specify io.opencensus:opencensus-api:jar:0.23.0?

ejona86 commented 5 years ago

I took the pom snippets verbatim and see a very different from mvn dependency:tree. spring-cloud-gcp-dependencies 1.2.0.M1 doesn't exist on Maven central, so I used 1.0.0 instead, since it was said it failed too. I copied from the grpc example project for the missing parts of the pom.xml, so that's why you see io.grpc:example in there.

Lots of downgrades in the output. At a very quick glance grpc-context is being downgraded and I see io.opencensus:opencensus-api:jar:0.15.0:compile downgraded from 0.21. Adding in requireUpperBoundDeps shows lots of issues. Please add requireUpperBoundDeps and resolve any issues first.

I don't know why you see opencensus-api 0.23 in your output.

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <executions>
          <execution>
            <id>enforce</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireUpperBoundDeps/>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO] 
[INFO] -----------------------< io.grpc:example-gauth >------------------------
[INFO] Building example-gauth 1.21.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:3.1.1:tree (default-cli) @ example-gauth ---
[INFO] io.grpc:example-gauth:jar:1.21.0
[INFO] +- com.googlecode.objectify:objectify:jar:6.0.2:compile
[INFO] |  +- net.spy:spymemcached:jar:2.12.3:compile
[INFO] |  +- com.google.cloud:google-cloud-datastore:jar:1.59.0:compile
[INFO] |  |  +- com.google.cloud:google-cloud-core-http:jar:1.59.0:compile
[INFO] |  |  |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.12.0:compile
[INFO] |  |  |  +- com.google.oauth-client:google-oauth-client:jar:1.27.0:compile
[INFO] |  |  |  +- com.google.api-client:google-api-client:jar:1.27.0:compile
[INFO] |  |  |  +- com.google.http-client:google-http-client-appengine:jar:1.27.0:compile
[INFO] |  |  |  +- com.google.http-client:google-http-client-jackson2:jar:1.27.0:compile
[INFO] |  |  |  +- com.google.api:gax-httpjson:jar:0.52.1:compile
[INFO] |  |  |  +- io.opencensus:opencensus-api:jar:0.15.0:compile
[INFO] |  |  |  \- io.opencensus:opencensus-contrib-http-util:jar:0.15.0:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-cloud-datastore-v1:jar:0.42.0:compile
[INFO] |  |  \- com.google.cloud.datastore:datastore-v1-proto-client:jar:1.6.0:compile
[INFO] |  |     +- com.google.http-client:google-http-client-protobuf:jar:1.20.0:compile
[INFO] |  |     \- com.google.http-client:google-http-client-jackson:jar:1.20.0:compile
[INFO] |  |        \- org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-pubsub:jar:1.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-gcp-starter:jar:1.1.0.RELEASE:compile
[INFO] |  |  +- org.springframework.cloud:spring-cloud-gcp-core:jar:1.1.0.RELEASE:compile
[INFO] |  |  \- org.springframework.cloud:spring-cloud-gcp-autoconfigure:jar:1.1.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-gcp-pubsub:jar:1.1.0.RELEASE:compile
[INFO] |     \- com.google.cloud:google-cloud-pubsub:jar:1.59.0:compile
[INFO] |        +- com.google.api.grpc:proto-google-cloud-pubsub-v1:jar:1.41.0:compile
[INFO] |        +- com.google.api.grpc:grpc-google-cloud-pubsub-v1:jar:1.41.0:compile
[INFO] |        \- com.google.auto.value:auto-value:jar:1.4:compile
[INFO] +- org.springframework.integration:spring-integration-core:jar:5.1.1.RELEASE:compile
[INFO] |  +- org.springframework:spring-core:jar:5.1.3.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jcl:jar:5.1.3.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.1.3.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:5.1.3.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:5.1.3.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-expression:jar:5.1.3.RELEASE:compile
[INFO] |  +- org.springframework:spring-messaging:jar:5.1.3.RELEASE:compile
[INFO] |  +- org.springframework:spring-tx:jar:5.1.3.RELEASE:compile
[INFO] |  +- org.springframework.retry:spring-retry:jar:1.2.2.RELEASE:compile
[INFO] |  \- io.projectreactor:reactor-core:jar:3.2.3.RELEASE:compile
[INFO] |     \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] +- com.google.cloud:google-cloud-containeranalysis:jar:0.98.0-beta:compile
[INFO] |  +- com.google.cloud:google-cloud-core:jar:1.59.0:compile
[INFO] |  |  +- joda-time:joda-time:jar:2.10.1:compile
[INFO] |  |  +- com.google.http-client:google-http-client:jar:1.27.0:compile
[INFO] |  |  +- com.google.api:api-common:jar:1.7.0:compile
[INFO] |  |  +- com.google.api:gax:jar:1.35.1:compile
[INFO] |  |  |  \- org.threeten:threetenbp:jar:1.3.3:compile
[INFO] |  |  +- com.google.protobuf:protobuf-java-util:jar:3.6.1:compile
[INFO] |  |  |  \- com.google.code.gson:gson:jar:2.8.5:compile
[INFO] |  |  +- com.google.api.grpc:proto-google-common-protos:jar:1.12.0:compile
[INFO] |  |  \- com.google.api.grpc:proto-google-iam-v1:jar:0.12.0:compile
[INFO] |  +- com.google.cloud:google-cloud-core-grpc:jar:1.59.0:compile
[INFO] |  |  +- com.google.auth:google-auth-library-credentials:jar:0.12.0:compile
[INFO] |  |  +- com.google.protobuf:protobuf-java:jar:3.6.1:compile
[INFO] |  |  +- io.grpc:grpc-protobuf:jar:1.16.1:compile
[INFO] |  |  |  \- io.grpc:grpc-protobuf-lite:jar:1.16.1:compile
[INFO] |  |  +- io.grpc:grpc-context:jar:1.16.1:compile
[INFO] |  |  \- com.google.api:gax-grpc:jar:1.35.1:compile
[INFO] |  +- com.google.api.grpc:proto-google-cloud-containeranalysis-v1:jar:0.63.0:compile
[INFO] |  +- com.google.api.grpc:proto-google-cloud-containeranalysis-v1beta1:jar:0.42.0:compile
[INFO] |  +- io.grafeas:grafeas:jar:0.1.0:compile
[INFO] |  +- io.grpc:grpc-netty-shaded:jar:1.21.0:compile
[INFO] |  |  \- io.grpc:grpc-core:jar:1.21.0:compile (version selected from constraint [1.21.0,1.21.0])
[INFO] |  |     +- com.google.android:annotations:jar:4.1.1.4:compile
[INFO] |  |     \- io.opencensus:opencensus-contrib-grpc-metrics:jar:0.21.0:compile
[INFO] |  +- io.grpc:grpc-stub:jar:1.21.0:compile
[INFO] |  |  \- io.grpc:grpc-api:jar:1.21.0:compile
[INFO] |  +- io.grpc:grpc-auth:jar:1.21.0:compile
[INFO] |  \- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- com.google.cloud:google-cloud-kms:jar:1.2.0:compile
[INFO] |  \- com.google.api.grpc:proto-google-cloud-kms-v1:jar:0.42.0:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-storage:jar:1.1.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-gcp-storage:jar:1.1.0.RELEASE:compile
[INFO] |     \- com.google.cloud:google-cloud-storage:jar:1.59.0:compile
[INFO] |        \- com.google.apis:google-api-services-storage:jar:v1-rev20181013-1.27.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.1.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.1.1.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:2.1.1.RELEASE:compile
[INFO] |  |  |  +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.11.1:compile
[INFO] |  |  |  |  \- org.apache.logging.log4j:log4j-api:jar:2.11.1:compile
[INFO] |  |  |  \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.23:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.1.1.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.7:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.7:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.7:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.7:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.1.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.13:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.13:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.13:compile
[INFO] |  +- org.hibernate.validator:hibernate-validator:jar:6.0.13.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  |  \- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] |  +- org.springframework:spring-web:jar:5.1.3.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.1.3.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.1.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:2.1.1.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.1.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.assertj:assertj-core:jar:3.11.1:test
[INFO] |  +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] |  |  +- net.bytebuddy:byte-buddy:jar:1.9.5:compile
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.9.5:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.6:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-test:jar:5.1.3.RELEASE:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] +- org.projectlombok:lombok:jar:1.18.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.1.1.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.1.1.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-actuator:jar:2.1.1.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.1.1:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- io.micrometer:micrometer-registry-prometheus:jar:1.1.1:compile
[INFO] |  \- io.prometheus:simpleclient_common:jar:0.5.0:compile
[INFO] |     \- io.prometheus:simpleclient:jar:0.5.0:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-kubernetes:jar:1.0.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-kubernetes-core:jar:1.0.0.RELEASE:compile
[INFO] |  |  +- io.fabric8:kubernetes-client:jar:4.1.0:compile
[INFO] |  |  |  +- io.fabric8:kubernetes-model:jar:4.1.0:compile
[INFO] |  |  |  |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.7:compile
[INFO] |  |  |  +- com.squareup.okhttp3:okhttp:jar:3.8.1:compile
[INFO] |  |  |  |  \- com.squareup.okio:okio:jar:1.13.0:compile
[INFO] |  |  |  +- com.squareup.okhttp3:logging-interceptor:jar:3.8.1:compile
[INFO] |  |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.9.7:compile
[INFO] |  |  |  +- io.fabric8:zjsonpatch:jar:0.3.0:compile
[INFO] |  |  |  \- com.github.mifmif:generex:jar:1.0.1:compile
[INFO] |  |  |     \- dk.brics.automaton:automaton:jar:1.11-8:compile
[INFO] |  |  \- org.springframework.cloud:spring-cloud-context:jar:2.1.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-kubernetes-discovery:jar:1.0.0.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-kubernetes-config:jar:1.0.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-kubernetes-config:jar:1.0.0.RELEASE:compile
[INFO] |     \- org.springframework.security:spring-security-rsa:jar:1.0.7.RELEASE:compile
[INFO] |        \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] |           \- org.bouncycastle:bcprov-jdk15on:jar:1.60:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-trace:jar:1.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.1.0.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.1.RELEASE:compile
[INFO] |  |  \- org.springframework.cloud:spring-cloud-sleuth-core:jar:2.1.0.RELEASE:compile
[INFO] |  |     +- org.aspectj:aspectjrt:jar:1.9.2:compile
[INFO] |  |     +- io.zipkin.brave:brave-context-log4j2:jar:5.6.1:compile
[INFO] |  |     +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.6.1:compile
[INFO] |  |     |  \- io.zipkin.brave:brave-instrumentation-http:jar:5.6.1:compile
[INFO] |  |     +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.6.1:compile
[INFO] |  |     +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.6.1:compile
[INFO] |  |     +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.6.1:compile
[INFO] |  |     +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.6.1:compile
[INFO] |  |     +- io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.6.1:compile
[INFO] |  |     |  \- io.zipkin.brave:brave-instrumentation-servlet:jar:5.6.1:compile
[INFO] |  |     \- io.zipkin.brave:brave-instrumentation-jms:jar:5.6.1:compile
[INFO] |  +- io.zipkin.gcp:zipkin-sender-stackdriver:jar:0.9.0:compile
[INFO] |  |  +- io.zipkin.gcp:zipkin-translation-stackdriver:jar:0.9.0:compile
[INFO] |  |  +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.13:compile
[INFO] |  |  +- com.google.api.grpc:grpc-google-devtools-cloudtrace-v1:jar:0.1.1:compile
[INFO] |  |  |  \- com.google.api.grpc:grpc-google-common-protos:jar:1.12.0:compile
[INFO] |  |  +- io.zipkin.zipkin2:zipkin:test-jar:tests:2.11.11:compile
[INFO] |  |  \- io.zipkin.zipkin2:zipkin:jar:2.11.11:compile
[INFO] |  +- io.zipkin.gcp:brave-propagation-stackdriver:jar:0.9.0:compile
[INFO] |  |  \- io.zipkin.brave:brave:jar:5.5.2:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.1.0.RELEASE:compile
[INFO] |     +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.14:compile
[INFO] |     \- io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.14:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-logging:jar:1.1.0.RELEASE:compile
[INFO] |  +- ch.qos.logback.contrib:logback-json-classic:jar:0.1.5:compile
[INFO] |  |  +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] |  |  |  \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] |  |  \- ch.qos.logback.contrib:logback-json-core:jar:0.1.5:compile
[INFO] |  \- com.google.cloud:google-cloud-logging-logback:jar:0.77.0-alpha:compile
[INFO] |     \- com.google.cloud:google-cloud-logging:jar:1.59.0:compile
[INFO] |        \- com.google.api.grpc:proto-google-cloud-logging-v2:jar:0.42.0:compile
[INFO] +- ch.sbb:springboot-graceful-shutdown:jar:2.0:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:2.1.1.RELEASE:compile
[INFO] |  \- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.1.RELEASE:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.9.2:compile
[INFO] |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  +- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] |  +- io.springfox:springfox-spi:jar:2.9.2:compile
[INFO] |  |  \- io.springfox:springfox-core:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-schema:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-swagger-common:jar:2.9.2:compile
[INFO] |  +- io.springfox:springfox-spring-web:jar:2.9.2:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.4.0:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] |  \- org.mapstruct:mapstruct:jar:1.2.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.9.2:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-starter:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-netflix-hystrix:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.1.0.RELEASE:compile
[INFO] |  |  +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] |  |  \- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] |  +- com.netflix.hystrix:hystrix-core:jar:1.5.18:compile
[INFO] |  +- com.netflix.hystrix:hystrix-serialization:jar:1.5.18:compile
[INFO] |  |  +- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.7:runtime
[INFO] |  |  \- com.fasterxml.jackson.core:jackson-core:jar:2.9.7:compile
[INFO] |  +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.18:compile
[INFO] |  +- com.netflix.hystrix:hystrix-javanica:jar:1.5.18:compile
[INFO] |  |  +- org.apache.commons:commons-lang3:jar:3.8.1:runtime
[INFO] |  |  +- org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] |  |  \- org.aspectj:aspectjweaver:jar:1.9.2:compile
[INFO] |  \- io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-kubernetes-ribbon:jar:1.0.0.RELEASE:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-kubernetes-ribbon:jar:1.0.0.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-netflix-ribbon:jar:2.1.0.RELEASE:compile
[INFO] |  +- com.netflix.ribbon:ribbon:jar:2.3.0:compile
[INFO] |  |  +- com.netflix.ribbon:ribbon-transport:jar:2.3.0:runtime
[INFO] |  |  |  +- io.reactivex:rxnetty-contexts:jar:0.4.9:runtime
[INFO] |  |  |  \- io.reactivex:rxnetty-servo:jar:0.4.9:runtime
[INFO] |  |  +- javax.inject:javax.inject:jar:1:runtime
[INFO] |  |  \- io.reactivex:rxnetty:jar:0.4.9:runtime
[INFO] |  +- com.netflix.ribbon:ribbon-core:jar:2.3.0:compile
[INFO] |  |  \- commons-lang:commons-lang:jar:2.6:compile
[INFO] |  +- com.netflix.ribbon:ribbon-httpclient:jar:2.3.0:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.2.2:runtime
[INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] |  |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] |  |  |  \- commons-codec:commons-codec:jar:1.11:compile
[INFO] |  |  +- com.sun.jersey:jersey-client:jar:1.19.1:runtime
[INFO] |  |  |  \- com.sun.jersey:jersey-core:jar:1.19.1:runtime
[INFO] |  |  |     \- javax.ws.rs:jsr311-api:jar:1.1.1:runtime
[INFO] |  |  +- com.sun.jersey.contribs:jersey-apache-client4:jar:1.19.1:runtime
[INFO] |  |  +- com.netflix.servo:servo-core:jar:0.12.21:runtime
[INFO] |  |  \- com.netflix.netflix-commons:netflix-commons-util:jar:0.3.0:runtime
[INFO] |  +- com.netflix.ribbon:ribbon-loadbalancer:jar:2.3.0:compile
[INFO] |  |  \- com.netflix.netflix-commons:netflix-statistics:jar:0.1.1:runtime
[INFO] |  \- io.reactivex:rxjava:jar:1.3.8:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-openfeign:jar:2.1.0.RELEASE:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-openfeign-core:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- io.github.openfeign.form:feign-form-spring:jar:3.5.0:compile
[INFO] |  |     +- io.github.openfeign.form:feign-form:jar:3.5.0:compile
[INFO] |  |     \- commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] |  |        \- commons-io:commons-io:jar:2.2:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-commons:jar:2.1.0.RELEASE:compile
[INFO] |  |  \- org.springframework.security:spring-security-crypto:jar:5.1.2.RELEASE:compile
[INFO] |  +- io.github.openfeign:feign-core:jar:10.1.0:compile
[INFO] |  +- io.github.openfeign:feign-slf4j:jar:10.1.0:compile
[INFO] |  \- io.github.openfeign:feign-hystrix:jar:10.1.0:compile
[INFO] +- com.google.guava:guava:jar:27.1-jre:compile
[INFO] |  +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] |  +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] |  +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] |  +- org.checkerframework:checker-qual:jar:2.5.2:compile
[INFO] |  +- com.google.errorprone:error_prone_annotations:jar:2.2.0:compile
[INFO] |  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] |  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile
[INFO] +- com.google.truth:truth:jar:0.44:test
[INFO] |  +- org.checkerframework:checker-compat-qual:jar:2.5.5:test
[INFO] |  +- com.googlecode.java-diff-utils:diffutils:jar:1.3.0:test
[INFO] |  \- com.google.auto.value:auto-value-annotations:jar:1.6.3:test
[INFO] \- com.google.truth.extensions:truth-java8-extension:jar:0.44:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.455 s
[INFO] Finished at: 2019-07-15T17:12:33-07:00
[INFO] ------------------------------------------------------------------------
ejona86 commented 5 years ago

For completeness, these are the pom's I used. Parent:

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.grpc</groupId>
  <artifactId>examples</artifactId>
  <packaging>pom</packaging>
  <!-- Feel free to delete the comment at the end of these lines. It is just
       for safely updating the version in our release process. -->
  <version>1.21.0</version><!-- CURRENT_GRPC_VERSION -->
  <name>examples</name>
  <url>https://github.com/grpc/grpc-java</url>

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.1.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <java.version>11</java.version>

    <!-- Dependency versions -->
    <versions.errorprone>2.3.3</versions.errorprone>
    <versions.gracefulshutdown>2.0</versions.gracefulshutdown>
    <versions.guava>27.1-jre</versions.guava>
    <versions.jacoco>0.8.2</versions.jacoco>
    <versions.jib>1.0.2</versions.jib>
    <versions.lombok>1.18.8</versions.lombok>
    <versions.spring-cloud-gcp>1.0.0.RELEASE</versions.spring-cloud-gcp>
    <versions.spring-cloud>Greenwich.RELEASE</versions.spring-cloud>
    <versions.swagger>2.9.2</versions.swagger>
    <versions.truth>0.44</versions.truth>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-core</artifactId>
    </dependency>

    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-prometheus</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes-config</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-trace</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-logging</artifactId>
    </dependency>

    <dependency>
      <groupId>ch.sbb</groupId>
      <artifactId>springboot-graceful-shutdown</artifactId>
      <version>${versions.gracefulshutdown}</version>
    </dependency>

    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger2</artifactId>
      <version>${versions.swagger}</version>
    </dependency>

    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger-ui</artifactId>
      <version>${versions.swagger}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-kubernetes-ribbon</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-openfeign</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${versions.guava}</version>
    </dependency>

    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>${versions.truth}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.truth.extensions</groupId>
      <artifactId>truth-java8-extension</artifactId>
      <version>${versions.truth}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${versions.spring-cloud}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-gcp-dependencies</artifactId>
        <version>${versions.spring-cloud-gcp}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>

Child:

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>io.grpc</groupId>
  <artifactId>example-gauth</artifactId>
  <packaging>jar</packaging>
  <version>1.21.0</version><!-- CURRENT_GRPC_VERSION -->
  <name>example-gauth</name>
  <url>https://github.com/grpc/grpc-java</url>

  <parent>
    <groupId>io.grpc</groupId>
    <artifactId>examples</artifactId>
    <version>1.21.0</version>
  </parent>

<properties>
    <versions.objectify>6.0.2</versions.objectify>
    <versions.kms>1.2.0</versions.kms>
    <versions.containeranalysis>0.98.0-beta</versions.containeranalysis>
  </properties>

<dependencies>
    <dependency>
      <groupId>com.googlecode.objectify</groupId>
      <artifactId>objectify</artifactId>
      <version>${versions.objectify}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-pubsub</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>google-cloud-containeranalysis</artifactId>
      <version>${versions.containeranalysis}</version>
    </dependency>

    <dependency>
      <groupId>com.google.cloud</groupId>
      <artifactId>google-cloud-kms</artifactId>
      <version>${versions.kms}</version>
    </dependency>

    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-gcp-starter-storage</artifactId>
    </dependency>

  </dependencies>
</project>
meltsufin commented 5 years ago

@ejona86 1.2.0.M1 has much newer dependencies and is almost identical to current master. You can pull it from spring-milestones repository.

            <repositories>
                <repository>
                    <id>spring-snapshots</id>
                    <name>Spring Snapshots</name>
                    <url>https://repo.spring.io/libs-snapshot-local</url>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                </repository>
                <repository>
                    <id>spring-milestones</id>
                    <name>Spring Milestones</name>
                    <url>https://repo.spring.io/libs-milestone-local</url>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <id>spring-releases</id>
                    <name>Spring Releases</name>
                    <url>https://repo.spring.io/release</url>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
            </repositories>
ejona86 commented 5 years ago

@meltsufin, in any case, it is clear that opencensus was being downgraded. An old version is getting pulled in via google-cloud-core-http via google-cloud-datastore. Updating to a newer google-cloud-datastore (1.82.0 transitively depends on opencensus-api 0.21.0) or explicitly depending on a newer version of opencensus-api seems the appropriate fix. Also adding requireUpperBoundDeps would detect other similar problems to this at compile time.

There is no bug or incompatibility here. It's just Maven downgrading dependencies, which is obviously prone to breakage.

meltsufin commented 5 years ago

@ejona86 I thought that the use of BOMs should prevent this situation. We rely on the google-cloud-bom, but it doesn't manage the version of opencensus-api. @suztomo @elharo WDYT?

elharo commented 5 years ago

A BOM only manages what's listed in the BOM. google-cloud-bom covers the GCP orbit: guava, protobuf, grpc, google-http-java-client, and google-gcloud-java. It doesn't cover all the transitive dependencies, just makes sure they're compatible. opencensus wasn't a thing when we first started the BOM. We could add it now if it seems to fit, though I'm not convinced it does.

IN any case, I don't see a BOM being imported in this sample.

elefeint commented 2 years ago

Closing as obsolete.