<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright © 2024 Petr Panteleyev <petr@panteleyev.org>
  SPDX-License-Identifier: BSD-2-Clause
  -->
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.panteleyev</groupId>
    <artifactId>commons</artifactId>
    <version>1.4.1</version>

    <packaging>jar</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>Java Commons</description>
    <url>https://github.com/petr-panteleyev/java-commons</url>
    <licenses>
        <license>
            <name>The 2-Clause BSD License</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Petr Panteleyev</name>
            <email>petr@panteleyev.org</email>
            <organization>panteleyev.org</organization>
            <organizationUrl>https://github.com/petr-panteleyev</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/petr-panteleyev/java-commons.git</connection>
        <developerConnection>scm:git:ssh://github.com:petr-panteleyev/java-commons.git</developerConnection>
        <url>https://github.com/petr-panteleyev/java-commons/tree/master</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.release>21</maven.compiler.release>
        <!-- Plugins -->
        <mavenToolchainsPluginVersion>3.2.0</mavenToolchainsPluginVersion>
        <mavenCompilerPluginVersion>3.13.0</mavenCompilerPluginVersion>
        <mavenJarPluginVersion>3.4.2</mavenJarPluginVersion>
        <mavenSurefirePluginVersion>3.3.1</mavenSurefirePluginVersion>
        <mavenJavadocPluginVersion>3.8.0</mavenJavadocPluginVersion>
        <mavenSourcePluginVersion>3.3.1</mavenSourcePluginVersion>
        <mavenGpgPluginVersion>3.2.4</mavenGpgPluginVersion>
        <nexusStagingMavenPlugin>1.7.0</nexusStagingMavenPlugin>
        <!-- Dependencies -->
        <jUnitVersion>5.10.3</jUnitVersion>
    </properties>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-toolchains-plugin</artifactId>
                <version>${mavenToolchainsPluginVersion}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>toolchain</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <toolchains>
                        <jdk>
                            <version>${maven.compiler.release}</version>
                        </jdk>
                    </toolchains>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mavenCompilerPluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${mavenJarPluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${mavenJavadocPluginVersion}</version>
                <configuration>
                    <notimestamp>true</notimestamp>
                    <author>false</author>
                    <bottom><![CDATA[Copyright &copy; 2024, Petr Panteleyev]]></bottom>
                    <additionalOptions>-html5 --release ${maven.compiler.release}</additionalOptions>
                    <show>protected</show>
                    <doclint>none</doclint>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${mavenSurefirePluginVersion}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${mavenSourcePluginVersion}</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-gpg-plugin</artifactId>
                <version>${mavenGpgPluginVersion}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${nexusStagingMavenPlugin}</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
