<?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.nanolaba</groupId>
    <artifactId>sugar</artifactId>
    <name>sugar</name>
    <url>https://github.com/nanolaba/sugar</url>
    <description>Sugar — a tiny zero-dependency Java library of static syntactic-sugar helpers: run lambdas
        that throw checked exceptions, null-safe multi-value equality checks, and lazy memoization
    </description>

    <version>1.0</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <maven.compiler.release>8</maven.compiler.release>
        <github.global.server>github</github.global.server>

        <!-- libs-->
        <junit5.version>5.10.2</junit5.version>

        <!-- Maven plugins -->
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven-clean-plugin.version>3.3.2</maven-clean-plugin.version>
        <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
        <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
        <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
        <maven-install-plugin.version>3.1.1</maven-install-plugin.version>
        <maven-deploy-plugin.version>3.1.1</maven-deploy-plugin.version>
        <maven-site-plugin.version>3.12.1</maven-site-plugin.version>
        <maven-project-info-reports-plugin.version>3.5.0</maven-project-info-reports-plugin.version>

        <pitest-maven.version>1.15.8</pitest-maven.version>
        <pitest-junit5-plugin.version>1.2.1</pitest-junit5-plugin.version>

        <nrg-maven-plugin.version>0.4-SNAPSHOT</nrg-maven-plugin.version>
        <central-publishing-maven-plugin.version>0.8.0</central-publishing-maven-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>2.9.1</maven-javadoc-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>

        <nanolog.version>1.0</nanolog.version>
    </properties>

    <pluginRepositories>
        <pluginRepository>
            <id>central.sonatype.com-snapshot</id>
            <url>https://central.sonatype.com/repository/maven-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <licenses>
        <license>
            <name>Apache 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/nanolaba/sugar</url>
        <connection>scm:git:git://github.com/nanolaba/sugar.git</connection>
    </scm>

    <developers>
        <developer>
            <email>alexander@andriishin.com</email>
            <name>Alexander Andriishin</name>
        </developer>
    </developers>

    <repositories>
        <repository>
            <id>central.sonatype.com-snapshot</id>
            <url>https://central.sonatype.com/repository/maven-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${junit5.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-junit5-plugin</artifactId>
            <version>${pitest-junit5-plugin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.nanolaba</groupId>
            <artifactId>nanolog</artifactId>
            <version>${nanolog.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${maven-site-plugin.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>${pitest-maven.version}</version>
                <configuration>
                    <verbose>true</verbose>
                    <mutationThreshold>100</mutationThreshold>
                </configuration>
                <executions>
                    <execution>
                        <id>pitest</id>
                        <phase>test</phase>
                        <goals>
                            <goal>mutationCoverage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.nanolaba</groupId>
                <artifactId>nrg-maven-plugin</artifactId>
                <version>${nrg-maven-plugin.version}</version>
                <configuration>
                    <file>
                        <item>README.src.md</item>
                    </file>
                </configuration>
                <executions>
                    <execution>
                        <id>generate-readme</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>create-files</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
                <groupId>org.apache.maven.plugins</groupId>
                <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.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven-gpg-plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>${central-publishing-maven-plugin.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <waitUntil>published</waitUntil>
                    <deploymentName>Sugar ${project.version}</deploymentName>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
