GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Datastore: duplicate classes in dependencies · Issue #1278 · googleapis/google-cloud-java

Datastore: duplicate classes in dependencies #1278

New issue
Copy link
New issue
Copy link
Closed
#1365
Closed
Datastore: duplicate classes in dependencies#1278
#1365
Copy link
Assignees
mziccard

Description

@janbartel
janbartel
opened on Sep 23, 2016
Issue body actions

Using the com.google.cloud:google-cloud-datastore jar version 0.3.0 as a dependency in my project resulted in a lot of transitive dependency jars. I ran the duplicate-finder plugin and it came up with duplicate classes in multiple of the datastore dependenies. Might be something you can do to exclude some of the dependencies?
duplicate-finder.txt

?

Activity

Next
  1. mziccard commented on Sep 23, 2016

    @mziccard
    mziccard
    on Sep 23, 2016
    Contributor
    More actions

    Hi @janbartel, thanks for your interest in google-cloud-java.

    Duplicated classes related to package com.google.cloud.datastore:datastore-v1-protos:1.0.1 were already discussed here and we should be able to resolve them soon.

    For what concerns guava-related classes it seems that our dependency com.google.cloud.datastore:datastore-v1-proto-client is pulling guava-jdk5, which should be excluded instead (we do that elsewhere). @eddavisson would you consider excluding guava-jdk5? I believe google-http-client-protobuf is pulling it. The following updated dependency declaration should do the trick:

    <dependency>
      <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-protobuf</artifactId>
        <version>1.20.0</version>
        <exclusions>
          <exclusion>
            <artifactId>guava-jdk5</artifactId>
            <groupId>com.google.guava</groupId>
          </exclusion>
        </exclusions>
    </dependency>

    Also @eddavisson, I noticed that you still duplicate some common proto-related classes in datastore-v1-protos:1.2.0:

    [WARNING]   com.google.api.AnnotationsProto
    [WARNING]   com.google.api.CustomHttpPattern
    [WARNING]   com.google.api.CustomHttpPatternOrBuilder
    [WARNING]   com.google.api.Http
    [WARNING]   com.google.api.HttpOrBuilder
    [WARNING]   com.google.api.HttpProto
    [WARNING]   com.google.api.HttpRule
    [WARNING]   com.google.api.HttpRuleOrBuilder
    [WARNING]   com.google.rpc.Code
    [WARNING]   com.google.rpc.CodeProto
    [WARNING]   com.google.rpc.Status
    [WARNING]   com.google.rpc.StatusOrBuilder
    [WARNING]   com.google.rpc.StatusProto
    [WARNING]   com.google.type.LatLng
    [WARNING]   com.google.type.LatLngOrBuilder
    [WARNING]   com.google.type.LatLngProto

    You should be able to pull those dependencies from com.google.api.grpc:grpc-google-common-protos:0.1.0.

  2. eddavisson commented on Sep 23, 2016

    @eddavisson
    eddavisson
    on Sep 23, 2016
    More actions

    Some of the code in google-http-client-protobuf has an actual dependency on guava (though not in a public interface). Would the exclusion break that (or should we shade it instead)? I'm still a bit of a novice when it comes to Maven.

    That's great to know that the common proto classes are now available in a Maven artifact. I will work on making that update.

  3. mziccard commented on Sep 23, 2016

    @mziccard
    mziccard
    on Sep 23, 2016
    Contributor
    More actions

    From the dependency tree I see:

    [INFO] +- com.google.cloud.datastore:datastore-v1-proto-client:jar:1.1.0:compile
    [INFO] |  +- com.google.http-client:google-http-client-protobuf:jar:1.20.0:compile
    [INFO] |  \- com.google.api-client:google-api-client:jar:1.20.0:compile
    [INFO] |     \- com.google.guava:guava-jdk5:jar:13.0:compile

    guava-jdk5 is pulled by com.google.api-client:google-api-client. Something similar happens also in google-cloud-core where we already include a more recent version of guava (as you also do in datastore-v1-proto-client) and went ahead to exclude guava-jdk5. But don't trust my words, you better give it a try :)

  4. mziccard commented on Sep 29, 2016

    @mziccard
    mziccard
    on Sep 29, 2016
    Contributor
    More actions

    @janbartel we just released google-cloud 0.4.0 which should have considerably removed duplicate classes. We still have some duplicates related to the following dependencies of ours:

    • datastore-v1-proto-client and grpc-google-common-protos: @eddavisson is taking care of this
    • protobuf-java and protobuf-lite: I need to investigate wether is safe to exclude protobuf-lite
  5. eddavisson commented on Oct 5, 2016

    @eddavisson
    eddavisson
    on Oct 5, 2016
    More actions

    datastore-v1-protos:1.3.0 removes the classes mentioned above and datastore-v1-proto-client:1.3.0 excludes guava-jdk5.

  6. mziccard commented on Oct 5, 2016

    @mziccard
    mziccard
    on Oct 5, 2016
    Contributor
    More actions

    Thank you @eddavisson, I will take care of updating the dependency soon!

  7. mziccard
    closed this as completedin #1365on Nov 4, 2016
  8. JustinBeckwith
    assigned
    mziccard
    on Feb 1, 2021
  9. github-actions
    added 2 commits that reference this issue on Jun 29, 2022

    chore: update jre to 11 for linter (googleapis#1278) (googleapis#668)

    b7f2615

    chore: update jre to 11 for linter (#1278) (#373)

    31cdb06
  10. github-actions
    added a commit that references this issue on Aug 9, 2022

    build(deps): update dependency com.google.cloud:google-cloud-shared-c…

    ecc3d2f
  11. github-actions
    added 2 commits that reference this issue on Oct 4, 2022

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    a83e1f7

    chore(main): release 2.3.16 (#1279)

    4c339ca
  12. meltsufin
    added 2 commits that reference this issue on Dec 22, 2025

    chore: update jre to 11 for linter (#1278) (#738)

    2e66252

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    c723c60
  13. 8 remaining items

  14. chingor13
    added 2 commits that reference this issue on Mar 12, 2026

    chore: update jre to 11 for linter (#1278) (#792)

    c12a5da

    chore(deps): update dependency org.graalvm.buildtools:native-maven-pl…

    2574c6d
  15. suztomo
    added 3 commits that reference this issue on Mar 23, 2026

    chore: update jre to 11 for linter (googleapis#1278) (googleapis#663)

    b4b83fd

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    4fbb6a8

    chore(main): release 2.11.3 (googleapis#1279)

    bc99384
  16. suztomo
    added 2 commits that reference this issue on Mar 30, 2026

    chore: update jre to 11 for linter (#1278) (#758)

    fe41dc1

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    5483895
  17. lqiu96
    added 2 commits that reference this issue on Apr 1, 2026

    chore: update jre to 11 for linter (#1278) (#758)

    d59758c

    chore(deps): update dependency com.google.cloud:libraries-bom to v26.…

    f22d1be
  18. meltsufin
    added 6 commits that reference this issue on Apr 29, 2026

    chore: update jre to 11 for linter (#1278) (#906)

    3adce67

    deps: update dependency com.google.cloud:google-cloud-core to v2.8.12 (…

    4ae1156

    chore(main): release 1.120.17 (#1285)

    c581e7e

    chore: update jre to 11 for linter (#1278) (#906)

    42e97bb

    deps: update dependency com.google.cloud:google-cloud-core to v2.8.12 (…

    bd7b937

    chore(main): release 1.120.17 (#1285)

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

Metadata

Metadata

Assignees

  • @mziccard
    mziccard

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.