You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Datastore: duplicate classes in dependencies #1278
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
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:
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.
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 :)
@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
Activity
mziccard commentedon Sep 23, 2016
Hi @janbartel, thanks for your interest in
google-cloud-java.Duplicated classes related to package
com.google.cloud.datastore:datastore-v1-protos:1.0.1were 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-clientis pullingguava-jdk5, which should be excluded instead (we do that elsewhere). @eddavisson would you consider excludingguava-jdk5? I believegoogle-http-client-protobufis pulling it. The following updated dependency declaration should do the trick:Also @eddavisson, I noticed that you still duplicate some common proto-related classes in
datastore-v1-protos:1.2.0:You should be able to pull those dependencies from
com.google.api.grpc:grpc-google-common-protos:0.1.0.eddavisson commentedon Sep 23, 2016
Some of the code in
google-http-client-protobufhas an actual dependency onguava(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.
mziccard commentedon Sep 23, 2016
From the dependency tree I see:
guava-jdk5is pulled bycom.google.api-client:google-api-client. Something similar happens also ingoogle-cloud-corewhere we already include a more recent version ofguava(as you also do indatastore-v1-proto-client) and went ahead to excludeguava-jdk5. But don't trust my words, you better give it a try :)mziccard commentedon Sep 29, 2016
@janbartel we just released
google-cloud 0.4.0which should have considerably removed duplicate classes. We still have some duplicates related to the following dependencies of ours:datastore-v1-proto-clientandgrpc-google-common-protos: @eddavisson is taking care of thisprotobuf-javaandprotobuf-lite: I need to investigate wether is safe to excludeprotobuf-liteeddavisson commentedon Oct 5, 2016
datastore-v1-protos:1.3.0removes the classes mentioned above anddatastore-v1-proto-client:1.3.0excludesguava-jdk5.mziccard commentedon Oct 5, 2016
Thank you @eddavisson, I will take care of updating the dependency soon!
chore: update jre to 11 for linter (googleapis#1278) (googleapis#668)
chore: update jre to 11 for linter (#1278) (#373)
build(deps): update dependency com.google.cloud:google-cloud-shared-c…
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
chore(main): release 2.3.16 (#1279)
chore: update jre to 11 for linter (#1278) (#738)
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
8 remaining items
chore: update jre to 11 for linter (#1278) (#792)
chore(deps): update dependency org.graalvm.buildtools:native-maven-pl…
chore: update jre to 11 for linter (googleapis#1278) (googleapis#663)
deps: update dependency com.google.cloud:google-cloud-shared-dependen…
chore(main): release 2.11.3 (googleapis#1279)
chore: update jre to 11 for linter (#1278) (#758)
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
chore: update jre to 11 for linter (#1278) (#758)
chore(deps): update dependency com.google.cloud:libraries-bom to v26.…
chore: update jre to 11 for linter (#1278) (#906)
deps: update dependency com.google.cloud:google-cloud-core to v2.8.12 (…
chore(main): release 1.120.17 (#1285)
chore: update jre to 11 for linter (#1278) (#906)
deps: update dependency com.google.cloud:google-cloud-core to v2.8.12 (…
chore(main): release 1.120.17 (#1285)