<?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>de.treestack</groupId>
    <artifactId>throwing</artifactId>
    <version>1.2.0</version>

    <name>throwing</name>
    <description>Support for checked exceptions in Java 8+ functional interfaces</description>
    <url>https://github.com/treestack/throwing</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Christoph von Krüchten</name>
            <email>info@treestack.de</email>
            <organization>Treestack GmbH</organization>
            <organizationUrl>https://treestack.de</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/treestack/throwing</url>
        <connection>scm:git:git@github.com:treestack/throwing.git</connection>
        <developerConnection>scm:git:git@github.com:treestack/throwing.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/treestack/throwing/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/treestack/throwing/actions</url>
    </ciManagement>

    <properties>
        <!-- Java Compiler Settings -->
        <maven.compiler.release>8</maven.compiler.release>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Dependency Versions -->
        <jspecify.version>1.0.0</jspecify.version>
        <assertj.version>3.24.2</assertj.version>
        <junit.jupiter.version>5.11.1</junit.jupiter.version>

        <!-- Plugin Versions -->
        <maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
        <maven.source.plugin.version>3.3.1</maven.source.plugin.version>
        <maven.javadoc.plugin.version>3.10.1</maven.javadoc.plugin.version>
        <maven.gpg.plugin.version>3.2.6</maven.gpg.plugin.version>
        <maven.release.plugin.version>3.0.1</maven.release.plugin.version>
        <central.publishing.plugin.version>0.7.0</central.publishing.plugin.version>
        <jacoco.maven.plugin.version>0.8.12</jacoco.maven.plugin.version>
        <maven.checkstyle.plugin.version>3.5.0</maven.checkstyle.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.jspecify</groupId>
            <artifactId>jspecify</artifactId>
            <version>${jspecify.version}</version>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven.source.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadoc.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadoc</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${central.publishing.plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <release>8</release>
                    <compilerArgs>
                        <arg>-Xlint:-options</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.plugin.version}</version>
                <configuration>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <releaseProfiles>release</releaseProfiles>
                    <projectVersionPolicyId>SemVerVersionPolicy</projectVersionPolicyId>
                    <scmCommentPrefix>[skip ci]</scmCommentPrefix>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <configuration>
                    <configLocation>${project.basedir}/config/checkstyle/checkstyle.xml</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <configuration>
                    <configLocation>${project.basedir}/config/checkstyle/checkstyle.xml</configLocation>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

</project>