<?xml version="1.0"?>
<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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.tietoevry.quarkus</groupId>
    <artifactId>quarkus-resteasy-problem-parent</artifactId>
    <version>3.9.0</version>
    <packaging>pom</packaging>

    <name>Quarkus - RESTeasy - Problem - Parent</name>
    <description>Problem Details for HTTP APIs (RFC-7807) implementation for Quarkus / RESTeasy - Parent POM.
    </description>
    <url>https://github.com/Tietoevry/quarkus-resteasy-problem</url>

    <properties>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <maven.compiler.release>${java.version}</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- runtime/test dependencies -->
        <quarkus.version>3.9.1</quarkus.version>
        <zalando-problem.version>0.27.1</zalando-problem.version>
        <assertj.version>3.25.3</assertj.version>
        <jmh.version>1.37</jmh.version>
        <jsr305.version>3.0.2</jsr305.version>
        <archunit.version>1.2.1</archunit.version>

        <!-- maven plugins -->
        <maven.compiler-plugin.version>3.13.0</maven.compiler-plugin.version>
        <maven.release-plugin.version>3.0.1</maven.release-plugin.version>
        <maven.source-plugin.version>3.3.0</maven.source-plugin.version>
        <maven.deploy-plugin.version>3.1.1</maven.deploy-plugin.version>
        <maven.javadoc-plugin.version>3.6.3</maven.javadoc-plugin.version>
        <sign-maven-plugin.version>1.1.0</sign-maven-plugin.version>
        <surefire-plugin.version>3.2.5</surefire-plugin.version>
        <failsafe-plugin.version>3.2.5</failsafe-plugin.version>
        <forbiddenapis-maven-plugin.version>3.7</forbiddenapis-maven-plugin.version>
        <formatter-maven-plugin.version>2.23.0</formatter-maven-plugin.version>
        <impsort-maven-plugin.version>1.9.0</impsort-maven-plugin.version>
    </properties>

    <modules>
        <module>runtime</module>
        <module>deployment</module>
        <module>integration-test</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-bom</artifactId>
                <version>${quarkus.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.zalando</groupId>
                <artifactId>problem</artifactId>
                <version>${zalando-problem.version}</version>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release-plugin.version}</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <goals>install</goals>
                    <arguments>-DskipTests</arguments>
                </configuration>
            </plugin>

            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${formatter-maven-plugin.version}</version>
                <configuration>
                    <configFile>${maven.multiModuleProjectDirectory}/ide-config/eclipse-format.xml</configFile>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>format</goal>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
                <version>${impsort-maven-plugin.version}</version>
                <configuration>
                    <removeUnused>true</removeUnused>
                </configuration>
                <executions>
                    <execution>
                        <id>sort-imports</id>
                        <goals>
                            <goal>sort</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>check-imports</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven.deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire-plugin.version}</version>
                    <configuration>
                        <argLine>-Duser.language=en -Duser.region=US</argLine>
                        <systemPropertyVariables>
                            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                            <quarkus.log.console.level>OFF</quarkus.log.console.level>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${failsafe-plugin.version}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                            <quarkus.log.console.level>OFF</quarkus.log.console.level>
                        </systemPropertyVariables>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>${forbiddenapis-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>verify-forbidden-apis</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <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>
                                    <bundledSignature>jdk-reflection</bundledSignature>

                                    <!-- All following signatures should be replicated for each target JDK version we intend to support -->
                                    <bundledSignature>jdk-unsafe-1.8</bundledSignature>
                                    <bundledSignature>jdk-unsafe-11</bundledSignature>

                                    <bundledSignature>jdk-deprecated-1.8</bundledSignature>
                                    <bundledSignature>jdk-deprecated-11</bundledSignature>

                                    <bundledSignature>jdk-internal-1.8</bundledSignature>
                                    <bundledSignature>jdk-internal-11</bundledSignature>
                                </bundledSignatures>
                                <failOnMissingClasses>false</failOnMissingClasses>
                                <ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven.source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.simplify4u.plugins</groupId>
                        <artifactId>sign-maven-plugin</artifactId>
                        <version>${sign-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>quick</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code.formatter</groupId>
                        <artifactId>formatter-maven-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>net.revelc.code</groupId>
                        <artifactId>impsort-maven-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>de.thetaphi</groupId>
                        <artifactId>forbiddenapis</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:tietoevry/quarkus-resteasy-problem.git</connection>
        <developerConnection>scm:git:git@github.com:tietoevry/quarkus-resteasy-problem.git
        </developerConnection>
        <url>https://github.com/tietoevry/quarkus-resteasy-problem/tree/master</url>
        <tag>v3.9.0</tag>
    </scm>

    <developers>
        <developer>
            <name>Data Platforms</name>
            <organization>Tietoevry</organization>
            <organizationUrl>https://tietoevry.com</organizationUrl>
            <timezone>UTC+01:00</timezone>
        </developer>
    </developers>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
