This is an automated email from the ASF dual-hosted git repository.

gaul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jclouds.git

commit 57f6bbc43a921a93df295f246dea805e302dd90a
Author: gurkerl83 <[email protected]>
AuthorDate: Wed Feb 3 22:55:29 2021 +0100

    Remove explicit OSGi import range of okio dep
    
    All OkHttp components get shipped with any OSGi metadata. Tracking the 
progress of that issue from version 5 onwards, OkHttp finally provides OSGi 
support. Because JClouds OkHttp dependencies got renewed from 2.2.0 to the 
latest 3 (3.14.9), the respective bundles from Apache Servicemix got used in a 
deployment scenario. On the other hand, the problem with Servicemix is that 
there is no full match of published OkHttp dependencies to the respective 
bundle equivalent.
    
    
https://mvnrepository.com/artifact/org.apache.servicemix.bundles/org.apache.servicemix.bundles.okhttp
    
    My test shows that none of the version 3 bundles work because of a missing 
package dependency "javax.annotation.meta". Sure higher version of 9 strips the 
javax.annotation module entirely, but the meta package is not there in JDK 8 
either. As you can see from the link above, only two versions of 3.14 got 
published in the service mix; it is not clear to which version the bundle 
equivalents relate. From my understanding, it is much more important to use 
identical versions of OkHttp depe [...]
    
    To utilize the original OKHttp libraries, consumer projects have to ensure 
those libraries get loaded using OSGi helper tools such as the wrap protocol 
provided by Apache Karaf or similar.
    
    To reduce OSGi noise, I removed the OSGi import range of okio dependency 
entirely. A declaration like that does not make sense; otherwise, a set of 
Okhttp ranges must also be defined.
    
    Note: The wildcard (*) declaration provides a way out, which allows any 
version of a package used in JClouds but itself does not give any OSGi 
metadata. Hopefully, I do not confuse you too much.
---
 drivers/okhttp/pom.xml | 9 +++++++++
 project/bnd.bnd        | 1 -
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/okhttp/pom.xml b/drivers/okhttp/pom.xml
index 4fe0534..c9ea5d7 100644
--- a/drivers/okhttp/pom.xml
+++ b/drivers/okhttp/pom.xml
@@ -30,6 +30,10 @@
   <name>jclouds OkHttp Driver</name>
   <description>OkHttp Driver</description>
 
+  <properties>
+    <okio.version>1.17.2</okio.version>
+  </properties>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.jclouds</groupId>
@@ -49,6 +53,11 @@
       <version>${okhttp.version}</version>
     </dependency>
     <dependency>
+      <groupId>com.squareup.okio</groupId>
+      <artifactId>okio</artifactId>
+      <version>${okio.version}</version>
+    </dependency>
+    <dependency>
       <groupId>com.squareup.okhttp3</groupId>
       <artifactId>mockwebserver</artifactId>
       <scope>test</scope>
diff --git a/project/bnd.bnd b/project/bnd.bnd
index 7c4e658..b7efa2a 100644
--- a/project/bnd.bnd
+++ b/project/bnd.bnd
@@ -27,5 +27,4 @@ X-Compile-Target-JDK: \
 
 Import-Package: \
     com.google.common.*;version="[27.1,30.1.0)", \
-    okio.*;version="[1.2.0,1.3)", \
     *
\ No newline at end of file

Reply via email to