Add OSGi version ranges, guice, okio

In the present feature, the two properties
- guava.osgi.import and
- okhttp.version
have not been attached to the build process (Bnd plugin), but have been recorded as comments only.

Before the resolution method is considered, the problem of Guava and its close coupling with Guice must be examined.

The Guice project possesses, differently to GSON no explicit configuration, how its dependencies are regarded in an OSGi execution environment.

Guice / Guava
- 4.1.0 / 19.0
- 4.2.0 /  [23.6,24)
- 4.2.1 / [25.1,26)
- 4.2.3 / [27.1,28) => used
- 5.0.0.BETA-1 / [27.1,28)

The version of Guice built into JClouds is 4.2.3. Increasing to this version number was not the subject of the current branch.

To avoid backward compatibility problems between Guice and Guava (e.g. Guice 4.2.3 -> Guava 24) this means that the version of Guava integrated in JClouds must be at least version 27.1. Guice puts this in its dependencies.

In my opinion, consumers (JClouds, as well as consumers of JClouds) should take this minimum barrier into account.

Resolution
To understand the resolution, please consider the following previously unmerged feature.
https://github.com/apache/jclouds/pull/86

In order to add a Guava verison range to the bundles rolled out by JClouds, the following import rule is added in the BND Configuration of the Project Module.

Import Package: \
    com.google.common.*;version="[27.1,30.1.0)", \
    okio.*;version="[1.2.0,1.3)", \
    *

In the output of each JClouds module that uses Guava (and there are some) the configuration to the range version is observed. The bnd built into the JClouds project modules acts as a base of other bnd configurations, and should also apply in the Lab and Co repositories. Adjusted artefacts only become valid when a release is available or the build of these repositories is triggered again.

Output - Core Module

Import package:
   com.google.common.base;version="[27.1,30.1.0)",
   com.google.common.cache;version="[27.1,30.1.0)",
   com.google.common.collect;version="[27.1,30.1.0)",
   ...
   com.google.gson;version="[2.8,3)",
   ...

Output - Blobstore Module

Import package:
   com.google.common.base;version="[27.1,30.1.0)",
   com.google.common.collect;version="[27.1,30.1.0)",
   com.google.common.hash;version="[27.1,30.1.0)",
   ...
   com.google.inject;version="[1.4,2)",
   ...

Oki version range
The okhttp dependency requires okio version 1.2. The ok* libraries respectively the dependencies used in these libraries do not have OSGi instructions. For this reason, the previously integrated configuration is used.

Local tests show that the import directive can also be set globally, see above. An explicit specification in the bnd file of the JClouds okHTTP module is not useful because this JClouds module also uses Guava.

Output - OkHTTP Module

Import package:
   com.google.common.base;version="[27.1,30.1.0)",
   com.google.common.collect;version="[27.1,30.1.0)",
   okio;version="[1.2.0,1.3)",
   com.google.inject;version="[1.4,2)",
   ...

Note:
In the following feature, the version of the "ok" framework has been significantly increased.  Extensive adjustments are also performed.

At this point, it should be noted that the import policy in the okio will probably have to be removed again because standalone OSGi metadata may be provided.
1 file changed
tree: a10f68cb3abc63e761f4f3b14df1d190ff5a6538
  1. all/
  2. allblobstore/
  3. allcompute/
  4. allloadbalancer/
  5. apis/
  6. blobstore/
  7. common/
  8. compute/
  9. core/
  10. drivers/
  11. loadbalancer/
  12. project/
  13. providers/
  14. resources/
  15. scriptbuilder/
  16. skeletons/
  17. .dir-locals.el
  18. .gitattributes
  19. .gitignore
  20. .mailmap
  21. .travis.yml
  22. CONTRIBUTING.md
  23. pom.xml
  24. README.md
README.md

jclouds

Apache jclouds is an open source multi-cloud toolkit for the Java platform that gives you the freedom to create applications that are portable across clouds while giving you full control to use cloud-specific features.

For more information about using or contributing to jclouds, please visit our website at jclouds.apache.org.

License

Copyright (C) 2009-2019 The Apache Software Foundation

Licensed under the Apache License, Version 2.0