Skip to content

Commit

Permalink
Use Add-Exports and Add-Opens manifest entries for google-java-fo…
Browse files Browse the repository at this point in the history
…rmat

to avoid passing the flags on the command line when using `java -jar`.

PiperOrigin-RevId: 432947555
  • Loading branch information
cushon authored and google-java-format Team committed Mar 7, 2022
1 parent ec76c66 commit ee81afc
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@
<!-- compile-time arguments for google-java-format -->
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED</arg>
<arg>--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>
</compilerArgs>
<annotationProcessorPaths>
<path>
Expand Down Expand Up @@ -233,6 +233,19 @@
<manifest>
<mainClass>com.google.googlejavaformat.java.Main</mainClass>
</manifest>
<manifestEntries>
<Add-Exports><!--
-->jdk.compiler/com.sun.tools.javac.api <!--
-->jdk.compiler/com.sun.tools.javac.file <!--
-->jdk.compiler/com.sun.tools.javac.main <!--
-->jdk.compiler/com.sun.tools.javac.model <!--
-->jdk.compiler/com.sun.tools.javac.parser <!--
-->jdk.compiler/com.sun.tools.javac.processing <!--
-->jdk.compiler/com.sun.tools.javac.tree <!--
-->jdk.compiler/com.sun.tools.javac.util<!--
--></Add-Exports>
<Add-Opens>jdk.compiler/com.sun.tools.javac.code jdk.compiler/com.sun.tools.javac.comp</Add-Opens>
</manifestEntries>
</archive>
</configuration>
</plugin>
Expand Down

0 comments on commit ee81afc

Please sign in to comment.