<?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>ie.bitstep.mango</groupId>
    <artifactId>mango4j</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>Mango4j</name>
    <description>Utility libraries for java</description>
    <url>https://github.com/bitstep-ie/mango4j</url>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>bitstep</id>
            <name>Bitstep</name>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/bitstep-ie/mango4j.git</connection>
        <developerConnection>scm:git:ssh://github.com/bitstep-ie/mango4j.git</developerConnection>
        <url>https://github.com/bitstep-ie/mango4j</url>
    </scm>

    <modules>
        <module>mango4j-collections</module>
        <module>mango4j-utils</module>
        <module>mango4j-hibernate-proxy-resolver</module>
        <module>mango4j-validation</module>
        <module>mango4j-reflection</module>
    </modules>

    <properties>
        <java.version>17</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <encoding>UTF-8</encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
        <project.resources.sourceEncoding>${encoding}</project.resources.sourceEncoding>
        <archetype.encoding>${encoding}</archetype.encoding>

        <!--    Plugin versions    -->
        <maven.deploy.plugin.version>3.1.4</maven.deploy.plugin.version>
        <maven.help.plugin>3.5.1</maven.help.plugin>
        <maven.compiler.plugin>3.13.0</maven.compiler.plugin>
        <maven.surefire.plugin.version>3.5.2</maven.surefire.plugin.version>
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
        <checkstyle.version>10.26.1</checkstyle.version>
        <pitest.plugin.version>1.22.0</pitest.plugin.version>
        <pitest.junit5.plugin.version>1.2.3</pitest.junit5.plugin.version>

        <!--    Dependencies versions    -->
        <junit-jupiter.version>5.13.3</junit-jupiter.version>
        <junit-mockito.version>5.18.0</junit-mockito.version>
        <mockito-core.version>5.18.0</mockito-core.version>
        <assertj.version>3.27.7</assertj.version>
        <jackson.version>2.19.1</jackson.version>
        <commons-collections.version>4.5.0</commons-collections.version>
        <slf4j-api.version>2.0.17</slf4j-api.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.9.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <waitUntil>published</waitUntil>
                    <deployAtEnd>true</deployAtEnd>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-help-plugin</artifactId>
                <version>${maven.help.plugin}</version>
            </plugin>

            <!--      Surefire      -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
            </plugin>

            <!--     Versions     -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.21.0</version>
                <configuration>
                    <ruleSet>
                        <ignoreVersion>
                            <type>regex</type>
                            <version>(.+-.*)</version> <!-- this will disable -SNAPSHOTS too -->
                        </ignoreVersion>
                    </ruleSet>
                    <allowMajorUpdates>false</allowMajorUpdates>
                    <allowSnapshots>false</allowSnapshots>
                </configuration>
            </plugin>

            <!--     JavaDocs     -->
            <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>

            <!-- Checkstyle -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <sourceDirectories>
                        <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
                    </sourceDirectories>
                    <excludes>**/generated/**/*</excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>build</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <!-- PITEST mvn clean test-compile org.pitest:pitest-maven:mutationCoverage   -->
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>${pitest.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-junit5-plugin</artifactId>
                        <version>${pitest.junit5.plugin.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <withHistory>false</withHistory>
                    <mutationThreshold>99</mutationThreshold>
                    <targetClasses>
                        <param>ie.bitstep.mango*</param>
                    </targetClasses>
                    <targetTests>
                        <param>ie.bitstep.mango*</param>
                    </targetTests>
                    <avoidCallsTo>
                        <param>java.lang.System$Logger</param>
                    </avoidCallsTo>
                </configuration>
            </plugin>

            <!-- Jacoco reports -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.14</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                    <id>sign-artifacts</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Sources -->
            <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</goal>
                    </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <version>${slf4j-api.version}</version>
        </dependency>

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

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

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

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