New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version range specification for guava in OSGi #934

Closed
wants to merge 1 commit into
base: 1.9.x
from

Conversation

Projects
None yet
4 participants
@CMoH
Contributor

CMoH commented Mar 9, 2016

This PR changes jclouds' OSGi import directive for guava to allow version range [16.x-19.0]. This helps dependent projects mix jclouds with bundles using other guava versions within OSGi environments.

According to https://issues.apache.org/jira/browse/JCLOUDS-622 jclouds was made to use only guava classes that are compatible throughout guava versions, so this should be safe for the time being.

What are your thoughs on this? Is there better way to solve this package resolution problem?

P.S. The changes are based on the 1.9.x branch, because that's the version we use right now. I can port them to master if needed.

@CMoH

This comment has been minimized.

Show comment
Hide comment
@CMoH

CMoH Mar 9, 2016

Contributor

For reference, here is an analysis of guava's API compatibility across versions: http://upstream.rosalinux.ru/java/versions/guava.html

Contributor

CMoH commented Mar 9, 2016

For reference, here is an analysis of guava's API compatibility across versions: http://upstream.rosalinux.ru/java/versions/guava.html

@neykov

This comment has been minimized.

Show comment
Hide comment
@neykov

neykov Mar 9, 2016

Contributor

+1, looks like this has already been discussed at https://issues.apache.org/jira/browse/JCLOUDS-534

Contributor

neykov commented Mar 9, 2016

+1, looks like this has already been discussed at https://issues.apache.org/jira/browse/JCLOUDS-534

Show outdated Hide outdated scriptbuilder/pom.xml
@@ -83,6 +83,6 @@
</configuration>
</plugin>
</plugins>
</build>
</build>-->

This comment has been minimized.

@nacx

nacx Mar 9, 2016

Member

I'm not an OSGi expert, but could you please explain why this should be commented?

@nacx

nacx Mar 9, 2016

Member

I'm not an OSGi expert, but could you please explain why this should be commented?

This comment has been minimized.

@CMoH

CMoH Mar 10, 2016

Contributor

I added the guava version range override in jclouds-project, but jclouds-scriptbuilder didn't get them because it had these settings for maven-bundle-plugin. It appears to me that these are unnecessary, since they are exactly the same as in jclouds-project - maybe they were left here by accident?

At first I commented them out, but I think I'll simply remove them when updating the PR.

@CMoH

CMoH Mar 10, 2016

Contributor

I added the guava version range override in jclouds-project, but jclouds-scriptbuilder didn't get them because it had these settings for maven-bundle-plugin. It appears to me that these are unnecessary, since they are exactly the same as in jclouds-project - maybe they were left here by accident?

At first I commented them out, but I think I'll simply remove them when updating the PR.

Show outdated Hide outdated project/pom.xml
@@ -206,6 +206,7 @@
<maven.site.url.base>gitsite:git@github.com/jclouds/jclouds-maven-site.git</maven.site.url.base>
<clojure.version>1.3.0</clojure.version>
<guava.version>16.0.1</guava.version>
<guava.osgi.import>com.google.common.*;version="[16.0.1,19.0.0]"</guava.osgi.import>

This comment has been minimized.

@gaul

gaul Mar 9, 2016

Member

Should this be half-closed notation, e.g., [16.0.1,20.0.0) ?

@gaul

gaul Mar 9, 2016

Member

Should this be half-closed notation, e.g., [16.0.1,20.0.0) ?

This comment has been minimized.

@nacx

nacx Mar 9, 2016

Member

FTR, these are the Guava versions we are compatible with (failed builds are due to transient issues):
https://jclouds.ci.cloudbees.com/job/jclouds-guava-guice-compat/

@nacx

nacx Mar 9, 2016

Member

FTR, these are the Guava versions we are compatible with (failed builds are due to transient issues):
https://jclouds.ci.cloudbees.com/job/jclouds-guava-guice-compat/

This comment has been minimized.

@CMoH

CMoH Mar 10, 2016

Contributor

@andrewgaul Yeah, that is better. I'll update the PR.

@CMoH

CMoH Mar 10, 2016

Contributor

@andrewgaul Yeah, that is better. I'll update the PR.

Improve version range specification for guava
The defaults of maven-bundle-plugin set the required version range to
only match guava-16, but the actual usage of guava within jclouds allows
any version after guava-16.

This helps dependent projects mix jclouds with bundles using other guava
versions within OSGi environments.
@nacx

This comment has been minimized.

Show comment
Hide comment
@nacx

nacx Mar 11, 2016

Member

Looks like an unrelated failure. Let's trigger the build again: rebuild please

Member

nacx commented Mar 11, 2016

Looks like an unrelated failure. Let's trigger the build again: rebuild please

@nacx

This comment has been minimized.

Show comment
Hide comment
@nacx

nacx Mar 15, 2016

Member

Just one last sanity check now that the 1.9.x branch build is back to green: rebuild please

Member

nacx commented Mar 15, 2016

Just one last sanity check now that the 1.9.x branch build is back to green: rebuild please

@nacx

This comment has been minimized.

Show comment
Hide comment
@nacx

nacx Mar 16, 2016

Member

Merged to master and 1.9.x. Thanks @CMoH!

Member

nacx commented Mar 16, 2016

Merged to master and 1.9.x. Thanks @CMoH!

@nacx nacx closed this Mar 16, 2016

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