[ 
https://issues.apache.org/jira/browse/CAMEL-14292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino resolved CAMEL-14292.
--------------------------------------
    Resolution: Fixed

> 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
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 2.24.3, 3.0.1, 2.25.0, 3.1.0
>
>
> 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|https://github.com/apache/camel/blob/camel-2.24.x/components/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubEndpoint.java]
>  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)

Reply via email to