<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.github.t1</groupId>
    <artifactId>problem-details</artifactId>
    <version>1.0.9</version>
    <packaging>pom</packaging>
    <name>Problem Details</name>
    <description>Problem Details [RFC-7807] Java API, TCK, and implementations for JAX-RS and Spring Boot</description>
    <url>https://github.com/t1/problem-details</url>

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding>

        <lombok.version>1.18.18</lombok.version>
        <microprofile.version>3.3</microprofile.version>
        <slf4j.version>1.7.30</slf4j.version>
        <resteasy.version>3.15.1.Final</resteasy.version>
        <snakeyaml.version>1.28</snakeyaml.version>
        <hibernate.version>6.2.0.Final</hibernate.version>

        <assertj.version>3.19.0</assertj.version>
        <junit.version>5.7.1</junit.version>
        <mockito.version>3.8.0</mockito.version>
        <jee-testcontainers.version>1.5.6</jee-testcontainers.version>
    </properties>

    <developers>
        <developer>
            <id>t1</id>
            <name>Rüdiger zu Dohna</name>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://choosealicense.com/licenses/apache-2.0/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <developerConnection>scm:git:https://github.com/t1/problem-details.git</developerConnection>
        <tag>v1.0.9</tag>
        <url>https://github.com/t1/problem-details.git</url>
    </scm>
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <name>t1-javaee-helpers</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <parameters>true</parameters>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
                <configuration>
                    <includes>
                        <include>*Behavior</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.22.2</version>
                <executions>
                    <execution>
                        <id>perform-it</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <doclint>-missing</doclint>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.8</version>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>api</module>
        <module>ri</module>
        <module>ri-lib</module>
        <module>ri-spring</module>
        <module>test-spring</module>
        <module>test</module>
    </modules>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- always run source+javadoc => see problems early & source available in local repo -->
                    <plugin>
                        <!-- but don't run gpg everywhere, esp. not in github actions -->
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
