diff --git a/pom.xml b/pom.xml
index 47ce41ceca11..0fa0c753f154 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1701,35 +1701,45 @@
maven-compiler-plugin
+
+ true
-XDcompilePolicy=simple
- -Xplugin:ErrorProne
+ -Xplugin:ErrorProne \
+ \
+ \
+ -Xep:GuardedBy:OFF \
+ -Xep:HashtableContains:OFF \
+ -Xep:BadInstanceof:ERROR \
+ -Xep:BoxedPrimitiveConstructor:ERROR \
+ -Xep:ClassCanBeStatic:ERROR \
+ -Xep:CompareToZero:ERROR \
+ -Xep:EqualsIncompatibleType:ERROR \
+ -Xep:FallThrough:ERROR \
+ -Xep:ImmutableSetForContains:ERROR \
+ -Xep:InconsistentHashCode:ERROR \
+ -Xep:InjectOnConstructorOfAbstractClass:ERROR \
+ -Xep:MissingCasesInEnumSwitch:ERROR \
+ -Xep:MissingOverride:ERROR \
+ -Xep:NullOptional:ERROR \
+ -Xep:ObjectToString:ERROR \
+ -Xep:UnnecessaryMethodReference:ERROR \
+ -Xep:UnnecessaryOptionalGet:ERROR \
+ -Xep:UnusedVariable:ERROR \
+ -Xep:UseEnumSwitch:ERROR \
-XepExcludedPaths:.*/target/generated-(|test-)sources/.*
-
-
-
- -Xep:GuardedBy:OFF
- -Xep:HashtableContains:OFF
-
- -Xep:BadInstanceof:ERROR
- -Xep:BoxedPrimitiveConstructor:ERROR
- -Xep:ClassCanBeStatic:ERROR
- -Xep:CompareToZero:ERROR
- -Xep:EqualsIncompatibleType:ERROR
- -Xep:FallThrough:ERROR
- -Xep:ImmutableSetForContains:ERROR
- -Xep:InconsistentHashCode:ERROR
- -Xep:InjectOnConstructorOfAbstractClass:ERROR
- -Xep:MissingCasesInEnumSwitch:ERROR
- -Xep:MissingOverride:ERROR
- -Xep:NullOptional:ERROR
- -Xep:ObjectToString:ERROR
- -Xep:UnnecessaryMethodReference:ERROR
- -Xep:UnnecessaryOptionalGet:ERROR
- -Xep:UnusedVariable:ERROR
- -Xep:UseEnumSwitch:ERROR
+ -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