<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>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.4.2</version>
        <relativePath />
    </parent>

    <groupId>com.pcistudio</groupId>
    <artifactId>task-processor</artifactId>
    <version>0.0.38</version>
    <packaging>pom</packaging>
    <name>Task processor</name>
    <description>
        Task processor is a library that provides a way to process tasks in a distributed environment, and keep track of
        the execution status of each task.
    </description>
    <url>https://pcistudio.github.io/task-processor</url>

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

    <modules>
        <module>task-processor-core</module>
        <module>task-processor-common</module>
        <module>task-processor-spring-jdbc</module>
        <module>task-processor-spring-jdbc-mysql</module>
        <module>task-processor-spring-jdbc-mariadb</module>
        <module>task-processor-spring-jdbc-h2</module>
        <module>task-processor-spring</module>
        <module>task-processor-spring-test</module>
        <module>task-processor-sample</module>
    </modules>

    <scm>
        <url>https://github.com/pcistudio/task-processor.git</url>
        <connection>scm:git:git://github.com:pcistudio/task-processor.git</connection>
        <developerConnection>scm:git:git@github.com:pcistudio/task-processor.git</developerConnection>

<!--        <connection>scm:git:https://github.com/pcistudio/task-processor.git</connection>-->
<!--        <developerConnection>scm:git:https://github.com/pcistudio/task-processor.git</developerConnection>-->
        <tag>task-processor-0.0.38</tag>
    </scm>

    <developers>
        <developer>
            <name>Junior Martori</name>
            <email>ymdomenech@gmail.com</email>
            <organization>PciStudio</organization>
            <organizationUrl>https://pcistudio.github.io/task-processor</organizationUrl>
        </developer>
    </developers>

    <properties>
        <resilience4jVersion>2.3.0</resilience4jVersion>
        <spotbugs-annotations.version>4.9.0</spotbugs-annotations.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <version>${spotbugs-annotations.version}</version>
        </dependency>
        <!--junit 5-->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- assertj-->
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- mockito -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.12.1</version>
            </dependency>

            <dependency>
                <groupId>net.javacrumbs.shedlock</groupId>
                <artifactId>shedlock-spring</artifactId>
                <version>5.16.0</version>
            </dependency>
            <dependency>
                <groupId>net.javacrumbs.shedlock</groupId>
                <artifactId>shedlock-provider-jdbc-template</artifactId>
                <version>5.16.0</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-core</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-common</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-spring-jdbc-mysql</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-spring-jdbc-mariadb</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-spring-jdbc-h2</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-spring</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-spring-jdbc</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>com.pcistudio</groupId>
                <artifactId>task-processor-spring-test</artifactId>
                <version>0.0.38</version>
            </dependency>
            <dependency>
                <groupId>io.github.resilience4j</groupId>
                <artifactId>resilience4j-circuitbreaker</artifactId>
                <version>${resilience4jVersion}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <releaseProfiles>release</releaseProfiles>
                        <goals>deploy</goals>
                        <scmDevelopmentCommitComment>[skip ci] - Prepare for next development iteration</scmDevelopmentCommitComment>
                        <scmReleaseCommitComment>[skip ci] - Prepare release @{releaseLabel}</scmReleaseCommitComment>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.36</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.26.0</version> <!-- Replace with the latest version -->
                <configuration>
                    <targetJdk>16</targetJdk> <!-- Adjust as per your project -->
                    <rulesets>
                        <ruleset>./codequality/pmd-config.xml</ruleset>
                    </rulesets>
                    <linkXRef>true</linkXRef>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <configLocation>google_checks.xml</configLocation>
                    <consoleOutput>true</consoleOutput>
                    <failOnViolation>true</failOnViolation>
                </configuration>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>4.8.6.6</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.antora</groupId>
                <artifactId>antora-maven-plugin</artifactId>
                <version>1.0.0-alpha.4</version>
                <configuration>
                    <playbookFile>task-processor-docs/src/docs/antora-playbook.yml</playbookFile>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>run-it</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <skipUTs>true</skipUTs>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>**/*Test.java</exclude>
                            </excludes>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <version>3.5.2</version>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</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>2.10.4</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>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>source</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
