Skip to content

Commit a76809c

Browse files
committed
HV-2145 Update forbidden api configuration
Signed-off-by: marko-bekhta <[email protected]>
1 parent 4d7b62f commit a76809c

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

pom.xml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -348,9 +348,9 @@
348348
<!-- Also set source/target, because several other plugins rely on this and don't understand release -->
349349
<maven.compiler.source>${java-version.main.release}</maven.compiler.source>
350350
<maven.compiler.target>${java-version.main.release}</maven.compiler.target>
351+
<maven.compiler.release>${java-version.main.release}</maven.compiler.release>
351352
<maven.compiler.testSource>${java-version.test.release}</maven.compiler.testSource>
352353
<maven.compiler.testTarget>${java-version.test.release}</maven.compiler.testTarget>
353-
<maven.compiler.release>${java-version.main.release}</maven.compiler.release>
354354
<maven.compiler.testRelease>${java-version.test.release}</maven.compiler.testRelease>
355355

356356
<!--
@@ -880,8 +880,9 @@
880880
<artifactId>forbiddenapis</artifactId>
881881
<version>${version.forbiddenapis.plugin}</version>
882882
<configuration>
883-
<!-- if the Java version used is too new, don't fail, just do nothing -->
883+
<!-- if the used Java version is too new, don't fail, just do nothing: -->
884884
<failOnUnsupportedJava>false</failOnUnsupportedJava>
885+
<failOnMissingClasses>false</failOnMissingClasses>
885886
<ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
886887
<suppressAnnotations>
887888
<annotation>**.IgnoreForbiddenApisErrors</annotation>
@@ -916,25 +917,32 @@
916917
<!-- These signatures on the top are not specific to any JDK version -->
917918
<bundledSignature>jdk-system-out</bundledSignature>
918919
<bundledSignature>jdk-non-portable</bundledSignature>
920+
<!-- The jdk-reflection is not yet something we can avoid -->
921+
<!--<bundledSignature>jdk-reflection</bundledSignature>-->
919922

920-
<!-- All following signatures should be replicated for each target JDK version we intend to support -->
921-
<bundledSignature>jdk-unsafe-17</bundledSignature>
922-
<bundledSignature>jdk-unsafe-18</bundledSignature>
923-
<bundledSignature>jdk-unsafe-19</bundledSignature>
924-
<bundledSignature>jdk-unsafe-21</bundledSignature>
925-
<bundledSignature>jdk-unsafe-22</bundledSignature>
923+
<!-- These signatures can safely be limited to the current JDK;
924+
see https://github.com/policeman-tools/forbidden-apis/issues/197#issuecomment-1080370368
925+
-->
926+
<bundledSignature>jdk-unsafe</bundledSignature>
926927

928+
<!-- All following signatures should be replicated for each target JDK version we intend to support -->
927929
<bundledSignature>jdk-deprecated-17</bundledSignature>
928930
<bundledSignature>jdk-deprecated-18</bundledSignature>
929931
<bundledSignature>jdk-deprecated-19</bundledSignature>
932+
<bundledSignature>jdk-deprecated-20</bundledSignature>
930933
<bundledSignature>jdk-deprecated-21</bundledSignature>
931934
<bundledSignature>jdk-deprecated-22</bundledSignature>
935+
<bundledSignature>jdk-deprecated-23</bundledSignature>
936+
<bundledSignature>jdk-deprecated-24</bundledSignature>
932937

933938
<bundledSignature>jdk-internal-17</bundledSignature>
934939
<bundledSignature>jdk-internal-18</bundledSignature>
935940
<bundledSignature>jdk-internal-19</bundledSignature>
941+
<bundledSignature>jdk-internal-20</bundledSignature>
936942
<bundledSignature>jdk-internal-21</bundledSignature>
937943
<bundledSignature>jdk-internal-22</bundledSignature>
944+
<bundledSignature>jdk-internal-23</bundledSignature>
945+
<bundledSignature>jdk-internal-24</bundledSignature>
938946
</bundledSignatures>
939947
</configuration>
940948
</execution>
@@ -945,8 +953,12 @@
945953
</goals>
946954
<phase>verify</phase>
947955
<configuration>
956+
<!-- Limit the JDK to the latest signature available one -->
957+
<testReleaseVersion>24</testReleaseVersion>
948958
<bundledSignatures>
949959
<bundledSignature>jdk-deprecated</bundledSignature>
960+
<bundledSignature>jdk-non-portable</bundledSignature>
961+
<bundledSignature>jdk-internal</bundledSignature>
950962
</bundledSignatures>
951963
</configuration>
952964
</execution>
@@ -1172,7 +1184,7 @@
11721184
<!-- Java 17+ adds a warning for every single class/method/etc. without a javadoc comment, and we have lots of those.-->
11731185
<additionalOption>-Xdoclint:all,-missing</additionalOption>
11741186
</additionalOptions>
1175-
<stylesheetfile>${project.build.directory}/hibernate-asciidoctor-theme/javadoc/jdk21/stylesheet.css</stylesheetfile>
1187+
<!-- <stylesheetfile>${project.build.directory}/hibernate-asciidoctor-theme/javadoc/jdk21/stylesheet.css</stylesheetfile>-->
11761188
</configuration>
11771189
</plugin>
11781190
<plugin>

0 commit comments

Comments
 (0)