diff --git a/java/adapter/avro/pom.xml b/java/adapter/avro/pom.xml
index 71ecf646049da..2635f9b79af58 100644
--- a/java/adapter/avro/pom.xml
+++ b/java/adapter/avro/pom.xml
@@ -63,6 +63,7 @@ under the License.
org.apache.maven.plugins
maven-compiler-plugin
+ true
${minimalJavaBuildVersion}
UTF-8
diff --git a/java/adapter/jdbc/pom.xml b/java/adapter/jdbc/pom.xml
index ca65ff3e2610c..a4b77146cc23f 100644
--- a/java/adapter/jdbc/pom.xml
+++ b/java/adapter/jdbc/pom.xml
@@ -123,6 +123,7 @@ under the License.
${minimalJavaBuildVersion}
UTF-8
+ true
-XDcompilePolicy=simple
-Xplugin:ErrorProne -XepAllErrorsAsWarnings
diff --git a/java/adapter/orc/pom.xml b/java/adapter/orc/pom.xml
index d9cd2bb21a526..017751cee5c13 100644
--- a/java/adapter/orc/pom.xml
+++ b/java/adapter/orc/pom.xml
@@ -160,6 +160,39 @@ under the License.
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+
+ ${minimalJavaBuildVersion}
+ UTF-8
+ true
+
+ -XDcompilePolicy=simple
+ -Xplugin:ErrorProne -XepAllErrorsAsWarnings
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
+ -J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
+ -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
+ -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
+ -Werror
+
+
+
+ com.google.errorprone
+ error_prone_core
+ ${error_prone_core.version}
+
+
+
+
+