[ 
https://issues.apache.org/jira/browse/JCLOUDS-1225?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15823177#comment-15823177
 ] 

Ian Springer commented on JCLOUDS-1225:
---------------------------------------

I was just reading through the comments in JCLOUDS-653 and saw this one that 
explains why the Guava 18 upgrade was reverted:

{quote}
This change was reverted as it accidentally violated our Runtime Portability 
goal in a quite severe way.
{quote}

which refers to this "Why Should I Use jclouds?" bullet (from 
http://jclouds.apache.org/start/what-is-jclouds/):

{quote}
RUNTIME PORTABILITY     jclouds drivers enable you to operate in restricted 
environments like Google App Engine. There are very few required dependencies, 
so jclouds is unlikely to clash with your app.
{quote}

I think jclouds has already violated this requirement in a severe way by having 
an unshaded Guava dependency in the first place, particularly because 1) so 
many projects use Guava and many different versions of Guava, and 2) unlike the 
JDK, Guava actually removes APIs once they've been deprecated for a few major 
releases (which is the cause of the issue I am encountering).

I think the easiest and best option would actually be shading Guava. Does 
anyone else agree?

> Guava 21 compatibility
> ----------------------
>
>                 Key: JCLOUDS-1225
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1225
>             Project: jclouds
>          Issue Type: Improvement
>          Components: jclouds-core
>    Affects Versions: 2.0.0
>            Reporter: Ian Springer
>              Labels: guava
>
> The below classes use com.google.common.base.Objects.ToStringHelper, which 
> has been deprecated since Guava 18, and has been removed in Guava 21. This 
> makes it impossible to use jclouds in a project using Guava 21. Please either 
> upgrade to Guava 18+ and switch to using 
> com.google.common.base.MoreObjects.ToStringHelper, or drop the usage of 
> ToStringHelper altogether. This will allow my project to upgrade to Guava 21 
> without having to use a fork of jclouds.
> * org/jclouds/apis/internal/BaseApiMetadata.java
> * org/jclouds/domain/internal/LocationImpl.java
> * org/jclouds/domain/internal/MutableResourceMetadataImpl.java
> * org/jclouds/domain/internal/ResourceMetadataImpl.java
> * org/jclouds/http/HttpMessage.java
> * org/jclouds/http/HttpRequest.java
> * org/jclouds/http/HttpResponse.java
> * org/jclouds/internal/BaseView.java
> * org/jclouds/providers/internal/BaseProviderMetadata.java
> * org/jclouds/reflect/InvocationSuccess.java
> * org/jclouds/rest/internal/BaseHttpApiMetadata.java
> * org/jclouds/rest/suppliers/URIFromStringSupplier.java



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to