This is an automated email from the ASF dual-hosted git repository.
zabetak pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new ca105f81240 HIVE-28885: Disable unnecessary annotation processing
(#6221)
ca105f81240 is described below
commit ca105f8124072d19d88a83b2ced613d326c9a26b
Author: Stamatis Zampetakis <[email protected]>
AuthorDate: Thu Dec 4 09:32:44 2025 +0100
HIVE-28885: Disable unnecessary annotation processing (#6221)
1. Disable annotation processors from all modules that do not need them.
2. Register PluginProcessor for Log4j on modules with plugins (i.e., ql,
llap-server, metastore-server)
3. Decouple immutables processor from errorprone processor and move
immutables processor in iceberg-catalog module since it is only used there.
The log4j-core dependency contains an annotation processor and this has
impact on the build leading to maven WARNING messages and the deactivation of
compile avoidance.
```
[WARNING] The following annotation processors were found on the classpath:
[org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor],
provided by
/home/someuser/.m2/repository/org/apache/logging/log4j/log4j-core/2.24.3/log4j-core-2.24.3.jar
Compile avoidance has been deactivated.
Please use the maven-compiler-plugin version 3.5 or above and use the
<annotationProcessorPaths> configuration element to declare the processors
instead.
If you did not intend to use the processors above (e.g. they were leaked by
a dependency), you can use the <proc>none</proc> option to disable annotation
processing.
For more information see
https://gradle.com/help/maven-extension-compile-avoidance.
```
Apart from compile avoidance the use of annotation processing can have
other side effects during the build and it can even lead to cryptic compilation
failures.
---
iceberg/iceberg-catalog/pom.xml | 18 ++++++++++++++++++
iceberg/pom.xml | 8 ++------
llap-server/pom.xml | 14 ++++++++++++++
pom.xml | 7 +++++++
ql/pom.xml | 14 ++++++++++++++
standalone-metastore/metastore-server/pom.xml | 14 ++++++++++++++
standalone-metastore/pom.xml | 7 +++++++
storage-api/pom.xml | 7 +++++++
8 files changed, 83 insertions(+), 6 deletions(-)
diff --git a/iceberg/iceberg-catalog/pom.xml b/iceberg/iceberg-catalog/pom.xml
index fe0c3e8b1f8..4d1c48b5def 100644
--- a/iceberg/iceberg-catalog/pom.xml
+++ b/iceberg/iceberg-catalog/pom.xml
@@ -127,4 +127,22 @@
<artifactId>httpcore5-h2</artifactId>
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc combine.self="override">full</proc>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.immutables</groupId>
+ <artifactId>value</artifactId>
+ <version>${immutables.value.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/iceberg/pom.xml b/iceberg/pom.xml
index 00bd6ce5369..10ce7e12c1c 100644
--- a/iceberg/pom.xml
+++ b/iceberg/pom.xml
@@ -323,17 +323,13 @@
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
</compilerArgs>
- <annotationProcessorPaths>
+ <proc combine.self="override">full</proc>
+ <annotationProcessorPaths combine.children="append">
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>${google.errorprone.version}</version>
</path>
- <path>
- <groupId>org.immutables</groupId>
- <artifactId>value</artifactId>
- <version>${immutables.value.version}</version>
- </path>
</annotationProcessorPaths>
</configuration>
</plugin>
diff --git a/llap-server/pom.xml b/llap-server/pom.xml
index 5bff5643c1a..a691cee6e1e 100644
--- a/llap-server/pom.xml
+++ b/llap-server/pom.xml
@@ -500,6 +500,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc combine.self="override">full</proc>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
diff --git a/pom.xml b/pom.xml
index e93859d7bb9..6247b18bf2c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1546,6 +1546,13 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc>none</proc>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
diff --git a/ql/pom.xml b/ql/pom.xml
index 2219df73edd..f75f373fa1d 100644
--- a/ql/pom.xml
+++ b/ql/pom.xml
@@ -925,6 +925,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc combine.self="override">full</proc>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
diff --git a/standalone-metastore/metastore-server/pom.xml
b/standalone-metastore/metastore-server/pom.xml
index 86c2f65655c..94217be1924 100644
--- a/standalone-metastore/metastore-server/pom.xml
+++ b/standalone-metastore/metastore-server/pom.xml
@@ -656,6 +656,20 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc combine.self="override">full</proc>
+ <annotationProcessorPaths>
+ <path>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>${log4j2.version}</version>
+ </path>
+ </annotationProcessorPaths>
+ </configuration>
+ </plugin>
<!-- TODO MS-SPLIT javadoc plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index 7b2f5c99200..2e03c3caf55 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -592,6 +592,13 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc>none</proc>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
diff --git a/storage-api/pom.xml b/storage-api/pom.xml
index 9d4ebba8d30..1d3ee01b036 100644
--- a/storage-api/pom.xml
+++ b/storage-api/pom.xml
@@ -195,6 +195,13 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <proc>none</proc>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>