Skip to content

Commit

Permalink
fix: make java.base fields accessible to fix java 17 runtime errors. (g…
Browse files Browse the repository at this point in the history
…oogleapis#688)

* fix: java 17 reflection issue

* add java.security
  • Loading branch information
mpeddada1 committed Jun 3, 2022
1 parent f8422eb commit 51a9a6f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions java-os-login/google-cloud-os-login/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
</dependency>
</dependencies>


<profiles>
<profile>
<id>java9</id>
Expand All @@ -109,6 +110,30 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>java17</id>
<activation>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--add-opens=java.base/java.time=ALL-UNNAMED
--add-opens=java.base/java.math=ALL-UNNAMED
--add-opens=java.base/sun.security.rsa=ALL-UNNAMED
--add-opens=java.base/sun.security.pkcs=ALL-UNNAMED
--add-opens=java.base/sun.security.x509=ALL-UNNAMED
--add-opens=java.base/sun.security.util=ALL-UNNAMED
--add-opens=java.base/java.security=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>

</profile>
</profiles>

<build>
Expand Down

0 comments on commit 51a9a6f

Please sign in to comment.