<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>quarkus-extensions-parent</artifactId>
        <groupId>io.quarkus</groupId>
        <version>3.27.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>quarkus-hibernate-orm-parent</artifactId>
    <name>Quarkus - Hibernate ORM</name>
    <packaging>pom</packaging>
    <modules>
        <module>deployment-spi</module>
        <module>deployment</module>
        <module>runtime</module>
        <module>runtime-dev</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <executions>
                        <execution>
                            <id>verify-forbidden-apis</id>
                            <configuration>
                                <!-- if the used Java version is too new, don't fail, just do nothing: -->
                                <failOnUnsupportedJava>false</failOnUnsupportedJava>
                                <excludes>
                                    <!-- JBoss Logger formats messages according to default Locale (bug or feature?) -->
                                    <exclude>**/*_$logger.class</exclude>
                                    <!-- JBoss message bundles format messages -->
                                    <exclude>**/*_$bundle.class</exclude>
                                </excludes>
                                <bundledSignatures>
                                    <!-- These signatures on the top are not specific to any JDK version -->
                                    <bundledSignature>jdk-system-out</bundledSignature>
                                    <bundledSignature>jdk-non-portable</bundledSignature>
                                    <!-- The jdk-reflection is not yet something we can avoid -->
                                    <!--<bundledSignature>jdk-reflection</bundledSignature>-->

                                    <!-- These signatures can safely be limited to the current JDK;
                                         see https://github.com/policeman-tools/forbidden-apis/issues/197#issuecomment-1080370368
                                     -->
                                    <bundledSignature>jdk-unsafe</bundledSignature>

                                    <!-- All following signatures should be replicated for each target JDK version we intend to support -->
                                    <bundledSignature>jdk-deprecated-11</bundledSignature>
                                    <bundledSignature>jdk-deprecated-12</bundledSignature>
                                    <bundledSignature>jdk-deprecated-13</bundledSignature>
                                    <bundledSignature>jdk-deprecated-14</bundledSignature>
                                    <bundledSignature>jdk-deprecated-15</bundledSignature>
                                    <bundledSignature>jdk-deprecated-16</bundledSignature>
                                    <bundledSignature>jdk-deprecated-17</bundledSignature>
                                    <bundledSignature>jdk-deprecated-18</bundledSignature>
                                    <bundledSignature>jdk-deprecated-19</bundledSignature>

                                    <bundledSignature>jdk-internal-11</bundledSignature>
                                    <bundledSignature>jdk-internal-12</bundledSignature>
                                    <bundledSignature>jdk-internal-13</bundledSignature>
                                    <bundledSignature>jdk-internal-14</bundledSignature>
                                    <bundledSignature>jdk-internal-15</bundledSignature>
                                    <bundledSignature>jdk-internal-16</bundledSignature>
                                    <bundledSignature>jdk-internal-17</bundledSignature>
                                    <bundledSignature>jdk-internal-18</bundledSignature>
                                    <bundledSignature>jdk-internal-19</bundledSignature>
                                </bundledSignatures>
                                <signaturesFiles>
                                    <signaturesFile>${maven.multiModuleProjectDirectory}/extensions/hibernate-orm/banned-signatures.txt</signaturesFile>
                                </signaturesFiles>
                                <failOnMissingClasses>false</failOnMissingClasses>
                                <ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
                            </configuration>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify-forbidden-test-apis</id>
                            <configuration>
                                <!-- if the used Java version is too new, don't fail, just do nothing: -->
                                <failOnUnsupportedJava>false</failOnUnsupportedJava>
                                <ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
                                <bundledSignatures>
                                    <!--
                                      This will automatically choose the right
                                      signatures based on 'maven.compiler.release':
                                    -->
                                    <bundledSignature>jdk-unsafe</bundledSignature>
                                    <bundledSignature>jdk-deprecated</bundledSignature>
                                    <bundledSignature>jdk-non-portable</bundledSignature>
                                    <bundledSignature>jdk-internal</bundledSignature>
                                </bundledSignatures>
                            </configuration>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCheck</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
