Skip to content

Commit 7e98200

Browse files
authored
fix: Compilation issues with error-prone on JDK16+ (#100)
See: https://errorprone.info/docs/installation
1 parent 49a08fd commit 7e98200

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pom.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,22 @@
115115
<configuration>
116116
<showWarnings>true</showWarnings>
117117
<failOnWarning>true</failOnWarning>
118+
<fork>true</fork>
118119
<compilerArgs>
119120
<arg>-Xlint:-options</arg>
120121
<arg>-XDcompilePolicy=simple</arg>
121122
<arg>-Xplugin:ErrorProne -XepExcludedPaths:${project.build.directory}/generated-sources/.* -XepDisableWarningsInGeneratedCode</arg>
123+
<!-- Required for ERROR-PRONE on JDK 16+ See https://errorprone.info/docs/installation -->
124+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
125+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
126+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
127+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED</arg>
128+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
129+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED</arg>
130+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
131+
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
132+
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
133+
<arg>-J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED</arg>
122134
</compilerArgs>
123135
<annotationProcessorPaths>
124136
<path>

0 commit comments

Comments
 (0)