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

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new 417a86b9ff GH-41789: [Java] Clean up immutables and checkerframework 
dependencies (#41790)
417a86b9ff is described below

commit 417a86b9ff11493dc35b95f4d8599ea269b1439c
Author: Laurent Goujon <[email protected]>
AuthorDate: Thu May 23 18:36:57 2024 -0700

    GH-41789: [Java] Clean up immutables and checkerframework dependencies 
(#41790)
    
    ### Rationale for this change
    
    As annotation processing is directly configured in `maven-compiler-plugin`, 
project dependencies should not include annotation processors in their 
dependencies, and annotations should be limited to `provided` scope as much as 
possible.
    
    ### What changes are included in this PR?
    
    Clean up immutables and checkerframework dependencies to address the issue 
above:
    * switch from `org.immutables:value` to `org.immutables:value-annotations`
    * update `org.immutables` dependencies from 2.10.0 to 2.10.1
    * change `org.checkerframework:checker-qual` default scope from `compile` 
to `provided`
    * add `org.immutables:value` and `org.checkerframework:checker` to the list 
of banned dependencies
    
    ### Are these changes tested?
    
    CI only
    
    ### Are there any user-facing changes?
    
    No
    * GitHub Issue: #41789
    
    Authored-by: Laurent Goujon <[email protected]>
    Signed-off-by: David Li <[email protected]>
---
 java/adapter/avro/pom.xml                              |  2 +-
 java/adapter/jdbc/pom.xml                              |  2 +-
 java/adapter/orc/pom.xml                               |  2 +-
 java/algorithm/pom.xml                                 |  2 +-
 java/c/pom.xml                                         |  2 +-
 java/compression/pom.xml                               |  2 +-
 java/dataset/pom.xml                                   |  2 +-
 java/flight/flight-core/pom.xml                        |  2 +-
 java/flight/flight-sql/pom.xml                         |  2 +-
 java/gandiva/pom.xml                                   |  2 +-
 java/memory/memory-core/pom.xml                        |  2 +-
 java/memory/memory-core/src/main/java/module-info.java |  2 --
 java/memory/memory-netty/pom.xml                       |  2 +-
 java/memory/memory-unsafe/pom.xml                      |  2 +-
 java/pom.xml                                           | 11 +++++++----
 java/tools/pom.xml                                     |  2 +-
 java/vector/pom.xml                                    |  2 +-
 17 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/java/adapter/avro/pom.xml b/java/adapter/avro/pom.xml
index 9ddc150253..0046fcac62 100644
--- a/java/adapter/avro/pom.xml
+++ b/java/adapter/avro/pom.xml
@@ -47,7 +47,7 @@
 
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
 
     <dependency>
diff --git a/java/adapter/jdbc/pom.xml b/java/adapter/jdbc/pom.xml
index 5f72729bb7..17681538ac 100644
--- a/java/adapter/jdbc/pom.xml
+++ b/java/adapter/jdbc/pom.xml
@@ -48,7 +48,7 @@
 
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
 
     <!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
diff --git a/java/adapter/orc/pom.xml b/java/adapter/orc/pom.xml
index f6aadca6de..ca817510bf 100644
--- a/java/adapter/orc/pom.xml
+++ b/java/adapter/orc/pom.xml
@@ -46,7 +46,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.orc</groupId>
diff --git a/java/algorithm/pom.xml b/java/algorithm/pom.xml
index 92fa5c8553..0854da48b7 100644
--- a/java/algorithm/pom.xml
+++ b/java/algorithm/pom.xml
@@ -44,7 +44,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/java/c/pom.xml b/java/c/pom.xml
index 1095e99bbd..bfb233315a 100644
--- a/java/c/pom.xml
+++ b/java/c/pom.xml
@@ -50,7 +50,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.arrow</groupId>
diff --git a/java/compression/pom.xml b/java/compression/pom.xml
index ff1c7e1690..26467dbaf2 100644
--- a/java/compression/pom.xml
+++ b/java/compression/pom.xml
@@ -37,7 +37,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
diff --git a/java/dataset/pom.xml b/java/dataset/pom.xml
index dd0c76523d..3dea16204a 100644
--- a/java/dataset/pom.xml
+++ b/java/dataset/pom.xml
@@ -46,7 +46,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.arrow</groupId>
diff --git a/java/flight/flight-core/pom.xml b/java/flight/flight-core/pom.xml
index a7ea80d68f..b565572b38 100644
--- a/java/flight/flight-core/pom.xml
+++ b/java/flight/flight-core/pom.xml
@@ -119,7 +119,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
 
     <dependency>
diff --git a/java/flight/flight-sql/pom.xml b/java/flight/flight-sql/pom.xml
index d5366ae988..e6d703c673 100644
--- a/java/flight/flight-sql/pom.xml
+++ b/java/flight/flight-sql/pom.xml
@@ -52,7 +52,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.arrow</groupId>
diff --git a/java/gandiva/pom.xml b/java/gandiva/pom.xml
index 00acb89f1d..26a28d55d2 100644
--- a/java/gandiva/pom.xml
+++ b/java/gandiva/pom.xml
@@ -36,7 +36,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.arrow</groupId>
diff --git a/java/memory/memory-core/pom.xml b/java/memory/memory-core/pom.xml
index ca5bc603bd..1e29ccf8ab 100644
--- a/java/memory/memory-core/pom.xml
+++ b/java/memory/memory-core/pom.xml
@@ -33,7 +33,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>org.checkerframework</groupId>
diff --git a/java/memory/memory-core/src/main/java/module-info.java 
b/java/memory/memory-core/src/main/java/module-info.java
index 5024b7f457..d8c22dd993 100644
--- a/java/memory/memory-core/src/main/java/module-info.java
+++ b/java/memory/memory-core/src/main/java/module-info.java
@@ -23,7 +23,5 @@ module org.apache.arrow.memory.core {
   exports org.apache.arrow.util;
   requires transitive jdk.unsupported;
   requires jsr305;
-  requires org.immutables.value;
   requires org.slf4j;
-  requires org.checkerframework.checker.qual;
 }
diff --git a/java/memory/memory-netty/pom.xml b/java/memory/memory-netty/pom.xml
index bb4ccd6c26..d815276b09 100644
--- a/java/memory/memory-netty/pom.xml
+++ b/java/memory/memory-netty/pom.xml
@@ -53,7 +53,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/java/memory/memory-unsafe/pom.xml 
b/java/memory/memory-unsafe/pom.xml
index 502ac2cc80..f1aa8fde1f 100644
--- a/java/memory/memory-unsafe/pom.xml
+++ b/java/memory/memory-unsafe/pom.xml
@@ -28,7 +28,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
   </dependencies>
 
diff --git a/java/pom.xml b/java/pom.xml
index 16564ae828..9956c3b2e9 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -115,6 +115,7 @@
         <groupId>org.checkerframework</groupId>
         <artifactId>checker-qual</artifactId>
         <version>${checker.framework.version}</version>
+        <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>com.google.flatbuffers</groupId>
@@ -149,8 +150,8 @@
       </dependency>
       <dependency>
         <groupId>org.immutables</groupId>
-        <artifactId>value</artifactId>
-        <version>2.10.0</version>
+        <artifactId>value-annotations</artifactId>
+        <version>2.10.1</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
@@ -309,7 +310,7 @@
               <path>
                 <groupId>org.immutables</groupId>
                 <artifactId>value</artifactId>
-                <version>2.10.0</version>
+                <version>2.10.1</version>
               </path>
             </annotationProcessorPaths>
           </configuration>
@@ -669,6 +670,9 @@
                     <exclude>org.mortbay.jetty:servlet-api</exclude>
                     <exclude>org.mortbay.jetty:servlet-api-2.5</exclude>
                     <exclude>log4j:log4j</exclude>
+                    <!-- Do not include annotation processors. Use the 
annotations-only artifacts -->
+                    <exclude>org.immutables:value</exclude>
+                    <exclude>org.checkerframework:checker</exclude>
                   </excludes>
                 </bannedDependencies>
               </rules>
@@ -777,7 +781,6 @@
                 <!-- source annotations (not kept in compiled code) -->
                 
<ignoredDependency>javax.annotation:javax.annotation-api:*</ignoredDependency>
                 
<ignoredDependency>org.apache.hadoop:hadoop-client-api</ignoredDependency>
-                
<ignoredDependency>org.checkerframework:checker-qual</ignoredDependency>
               </ignoredDependencies>
             </configuration>
           </execution>
diff --git a/java/tools/pom.xml b/java/tools/pom.xml
index b1507cd301..5d9db75e52 100644
--- a/java/tools/pom.xml
+++ b/java/tools/pom.xml
@@ -36,7 +36,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>com.google.guava</groupId>
diff --git a/java/vector/pom.xml b/java/vector/pom.xml
index a315bbc03a..c39504df2b 100644
--- a/java/vector/pom.xml
+++ b/java/vector/pom.xml
@@ -32,7 +32,7 @@
     </dependency>
     <dependency>
       <groupId>org.immutables</groupId>
-      <artifactId>value</artifactId>
+      <artifactId>value-annotations</artifactId>
     </dependency>
     <dependency>
       <groupId>com.fasterxml.jackson.core</groupId>

Reply via email to