Matthieu Ricciuti created CAMEL-14292:
-----------------------------------------
Summary: Remove unwanted dependency to google-http-client library
Key: CAMEL-14292
URL: https://issues.apache.org/jira/browse/CAMEL-14292
Project: Camel
Issue Type: Improvement
Components: camel-google-pubsub
Affects Versions: 2.24.2
Reporter: Matthieu Ricciuti
Current version of this component has an annoying implicit dependency to
"_com.google.http-client:google-http-client:1.22.0_" library, due to the
following import in `GooglePubsubEndpoint` class:
{{ import com.google.api.client.repackaged.com.google.common.base.Strings;}}
The wrong Strings class is being used ( the one from guava repackaged in
_google-http-client_ library, instead of the expected one from
_com.google.guava_ )
This makes very difficult to use this component as soon as we introduced other
google-related libraries that bring newer version of
`com.google.api-client:google-api-client` : newer version of this library
depend on version '1.28.0' of the 'google-http-client' library which does not
repackage guava anymore.
At runtime we simply get a NoClassDefFoundError:
java.lang.NoClassDefFoundError:
com/google/api/client/repackaged/com/google/common/base/Stringsjava.lang.NoClassDefFoundError:
com/google/api/client/repackaged/com/google/common/base/Strings at
org.apache.camel.component.google.pubsub.GooglePubsubEndpoint.afterPropertiesSet(GooglePubsubEndpoint.java:87)
Could you please fix this wrong import to "Strings" class?
Thanks.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)