<?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.melloware.openapi-problem</groupId>
    <artifactId>quarkus-openapi-problem-parent</artifactId>
    <version>0.0.1</version>
    <packaging>pom</packaging>
    <name>Quarkus - OpenAPI - Problem - Parent</name>
    <description>Problem Details for HTTP APIs (RFC-9457) implementation for Quarkus / OpenAPI - Parent POM.
    </description>
    <url>https://github.com/melloware/quarkus-openapi-problem</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <modules>
        <module>runtime</module>
        <module>deployment</module>
        <module>integration-test</module>
        <module>integration-tests-client</module>
    </modules>
    <scm>
        <connection>scm:git:git@github.melloware/quarkus-openapi-problem.git</connection>
        <developerConnection>scm:git:git@github.melloware/quarkus-openapi-problem.git</developerConnection>
        <url>https://github.com/melloware/quarkus-openapi-problem</url>
        <tag>HEAD</tag>
    </scm>
    <properties>
        <maven.compiler.release>17</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.19.3</quarkus.version>
        <zalando-problem.version>0.27.1</zalando-problem.version>
        <assertj.version>3.27.3</assertj.version>
        <jmh.version>1.37</jmh.version>
        <archunit.version>1.4.0</archunit.version>
        <lombok.version>1.18.36</lombok.version>
        <!-- maven plugins -->
        <maven.compiler-plugin.version>3.14.0</maven.compiler-plugin.version>
        <surefire-plugin.version>3.5.2</surefire-plugin.version>
        <failsafe-plugin.version>3.5.2</failsafe-plugin.version>
        <forbiddenapis-maven-plugin.version>3.8</forbiddenapis-maven-plugin.version>
        <formatter-maven-plugin.version>2.25.0</formatter-maven-plugin.version>
        <impsort-maven-plugin.version>1.12.0</impsort-maven-plugin.version>
    </properties>
    <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>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <name>Sonatype Nexus Releases</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>
    <developers>
        <developer>
            <id>melloware</id>
            <name>Emil Lefkof</name>
            <email>mellowaredev@gmail.com</email>
            <roles>
                <role>Buildmaster</role>
                <role>Developer</role>
            </roles>
            <timezone>America/New_York</timezone>
        </developer>
    </developers>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </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>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler-plugin.version}</version>
                    <configuration>
                        <parameters>true</parameters>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-config-doc-maven-plugin</artifactId>
                    <version>${quarkus.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <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>
                    <groupId>org.apache.maven.plugins</groupId>
                    <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>quick</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <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>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.0</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.6.3</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>