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

nicoloboschi pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit fc8cc1c90b21ef2fedb96ffe524ede49abbffa15
Author: Nicolò Boschi <[email protected]>
AuthorDate: Thu Feb 17 13:37:27 2022 +0100

    Remove --illegal-access errors resulting from Google Guice - Pulsar IO, 
Offloaders and Pulsar SQL - Bump Guice to 5.1.0 (#14300)
    
    * Remove --illegal-access errors resulting from Google Guice - Batch Data 
Generator connector
    
    * and jcloud-shaded
    
    * use dependencyManagement
    
    * fix pulsar-sql
    
    (cherry picked from commit 332eca8279bb145b3b272d93806f4c89f8a8923f)
---
 pom.xml                                | 14 +++++++++++++-
 pulsar-io/data-generator/pom.xml       | 12 ------------
 pulsar-sql/presto-distribution/LICENSE |  3 +--
 pulsar-sql/presto-distribution/pom.xml | 11 ++++-------
 tiered-storage/jcloud/pom.xml          | 13 -------------
 5 files changed, 18 insertions(+), 35 deletions(-)

diff --git a/pom.xml b/pom.xml
index 30594c27c8b..86735142faf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,7 +147,7 @@ flexible messaging model and an intuitive client 
API.</description>
     <avro.version>1.10.2</avro.version>
     <joda.version>2.10.5</joda.version>
     <jclouds.version>2.4.0</jclouds.version>
-    <guice.version>5.0.1</guice.version>
+    <guice.version>5.1.0</guice.version>
     <sqlite-jdbc.version>3.8.11.2</sqlite-jdbc.version>
     <mysql-jdbc.version>8.0.11</mysql-jdbc.version>
     <postgresql-jdbc.version>42.2.25</postgresql-jdbc.version>
@@ -635,6 +635,18 @@ flexible messaging model and an intuitive client 
API.</description>
         <version>${guava.version}</version>
       </dependency>
 
+      <dependency>
+        <groupId>com.google.inject</groupId>
+        <artifactId>guice</artifactId>
+        <version>${guice.version}</version>
+      </dependency>
+
+      <dependency>
+        <groupId>com.google.inject.extensions</groupId>
+        <artifactId>guice-assistedinject</artifactId>
+        <version>${guice.version}</version>
+      </dependency>
+
       <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-lang3</artifactId>
diff --git a/pulsar-io/data-generator/pom.xml b/pulsar-io/data-generator/pom.xml
index ecaaf64b775..1a49c3eb32b 100644
--- a/pulsar-io/data-generator/pom.xml
+++ b/pulsar-io/data-generator/pom.xml
@@ -49,18 +49,6 @@
             <artifactId>jfairy</artifactId>
             <version>0.5.9</version>
         </dependency>
-        <dependency>
-            <groupId>com.google.inject</groupId>
-            <artifactId>guice</artifactId>
-            <version>${guice.version}</version>
-            <scope>runtime</scope>
-        </dependency>
-        <dependency>
-            <groupId>com.google.inject.extensions</groupId>
-            <artifactId>guice-assistedinject</artifactId>
-            <version>${guice.version}</version>
-            <scope>runtime</scope>
-        </dependency>
 
         <dependency>
             <groupId>org.apache.avro</groupId>
diff --git a/pulsar-sql/presto-distribution/LICENSE 
b/pulsar-sql/presto-distribution/LICENSE
index d1e6166c7ba..411a7645fe4 100644
--- a/pulsar-sql/presto-distribution/LICENSE
+++ b/pulsar-sql/presto-distribution/LICENSE
@@ -225,8 +225,7 @@ The Apache Software License, Version 2.0
     - listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
     - failureaccess-1.0.1.jar
  * Google Guice
-    - guice-4.2.3.jar
-    - guice-multibindings-4.2.0.jar
+    - guice-5.1.0.jar
  * Apache Commons
     - commons-math3-3.6.1.jar
     - commons-compress-1.21.jar
diff --git a/pulsar-sql/presto-distribution/pom.xml 
b/pulsar-sql/presto-distribution/pom.xml
index b0741725685..cd6bec3020b 100644
--- a/pulsar-sql/presto-distribution/pom.xml
+++ b/pulsar-sql/presto-distribution/pom.xml
@@ -100,6 +100,10 @@
           <groupId>javax.activation</groupId>
           <artifactId>activation</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>com.google.inject.extensions</groupId>
+          <artifactId>guice-multibindings</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
 
@@ -137,13 +141,6 @@
       <version>${objectsize.version}</version>
     </dependency>
 
-    <!-- make sure guice is set to the correct version -->
-    <dependency>
-      <groupId>com.google.inject.extensions</groupId>
-      <artifactId>guice-multibindings</artifactId>
-      <version>${guice.version}</version>
-    </dependency>
-
     <!-- jackson dependencies -->
 
     <dependency>
diff --git a/tiered-storage/jcloud/pom.xml b/tiered-storage/jcloud/pom.xml
index 0e17362ef1b..716aed18b98 100644
--- a/tiered-storage/jcloud/pom.xml
+++ b/tiered-storage/jcloud/pom.xml
@@ -99,19 +99,6 @@
       <version>${jclouds.version}</version>
       <scope>provided</scope>
     </dependency>
-    <!-- https://github.com/apache/jclouds/pull/123/files-->
-    <dependency>
-      <groupId>com.google.inject</groupId>
-      <artifactId>guice</artifactId>
-      <version>${guice.version}</version>
-      <scope>runtime</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.google.inject.extensions</groupId>
-      <artifactId>guice-assistedinject</artifactId>
-      <version>${guice.version}</version>
-      <scope>runtime</scope>
-    </dependency>
 
     <dependency>
       <groupId>javax.xml.bind</groupId>

Reply via email to