Skip to content

Commit

Permalink
apacheGH-41789: [Java] Clean up immutables and checkerframework depen…
Browse files Browse the repository at this point in the history
…dencies (apache#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: apache#41789

Authored-by: Laurent Goujon <laurent@apache.org>
Signed-off-by: David Li <li.davidm96@gmail.com>
  • Loading branch information
laurentgo authored May 24, 2024
1 parent 0a79448 commit 417a86b
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion java/adapter/avro/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion java/adapter/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>

<!-- https://mvnrepository.com/artifact/com.h2database/h2 -->
Expand Down
2 changes: 1 addition & 1 deletion java/adapter/orc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.orc</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/algorithm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion java/c/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/compression/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/dataset/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/flight/flight-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion java/flight/flight-sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/gandiva/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.apache.arrow</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/memory/memory-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>org.checkerframework</groupId>
Expand Down
2 changes: 0 additions & 2 deletions java/memory/memory-core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,5 @@
exports org.apache.arrow.util;
requires transitive jdk.unsupported;
requires jsr305;
requires org.immutables.value;
requires org.slf4j;
requires org.checkerframework.checker.qual;
}
2 changes: 1 addition & 1 deletion java/memory/memory-netty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
</dependencies>

Expand Down
2 changes: 1 addition & 1 deletion java/memory/memory-unsafe/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
</dependencies>

Expand Down
11 changes: 7 additions & 4 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion java/tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value</artifactId>
<artifactId>value-annotations</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
2 changes: 1 addition & 1 deletion java/vector/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 417a86b

Please sign in to comment.