<?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>org.tuxdevelop</groupId>
    <artifactId>spring-batch-lightmin</artifactId>
    <packaging>pom</packaging>

    <name>Spring Batch Lightmin</name>

    <!-- project description -->
    <description>The Spring Batch Lightmin Projects contains libraries to manage Spring Batch Jobs
        within Spring Boot Applications
    </description>

    <!-- project url -->
    <url>https://github.com/tuxdevelop/spring-batch-lightmin</url>

    <!-- license -->
    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Marcel Becker</name>
            <email>tuxdevelop@gmail.com</email>
        </developer>
    </developers>

    <version>2.2.0</version>

    <modules>
        <module>spring-batch-lightmin-core</module>
        <module>spring-batch-lightmin-documentation</module>
        <module>spring-batch-lightmin-client</module>
        <module>spring-batch-lightmin-api</module>
        <module>spring-batch-lightmin-server</module>
        <module>spring-batch-lightmin-repository-server</module>
        <module>spring-batch-lightmin-repository</module>
        <module>spring-batch-lightmin-domain</module>
        <module>spring-batch-lightmin-test</module>
        <module>spring-batch-lightmin-util</module>
        <module>spring-batch-lightmin-embedded</module>
        <module>spring-batch-lightmin-validation</module>
        <module>spring-batch-lightmin-metrics</module>
    </modules>

    <properties>
        <spring.boot.version>2.4.1</spring.boot.version>
        <spring-cloud-dependencies.version>2020.0.0</spring-cloud-dependencies.version>
        <assertj.version>3.15.0</assertj.version>
        <openpojo.version>0.8.13</openpojo.version>
        <equalsverifier.version>1.7.5</equalsverifier.version>
        <datafactory.version>0.8</datafactory.version>
        <jacoco.version>0.8.5</jacoco.version>
        <infinispan9.version>9.4.20.Final</infinispan9.version>
        <infinispan.version>11.0.8.Final</infinispan.version>
        <!-- plugin versions -->
        <maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
        <maven-compiler-plugin.source>1.8</maven-compiler-plugin.source>
        <maven-compiler-plugin.target>1.8</maven-compiler-plugin.target>
        <nexus-staging-maven-plugin.version>1.6.3</nexus-staging-maven-plugin.version>
        <maven-source-plugin.version>2.2.1</maven-source-plugin.version>
        <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>
        <maven-surefire-plugin.version>2.20.1</maven-surefire-plugin.version>
        <maven-failsaife-plugin.version>2.20.1</maven-failsaife-plugin.version>
        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>
        <asciidoctor.version>1.5.2</asciidoctor.version>
        <!-- jacoco -->
        <jacoco.skip>false</jacoco.skip>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- spring boot dependencies -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>${spring.boot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <!-- assertj -->
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj.version}</version>
            </dependency>

            <!--datafactory -->
            <dependency>
                <groupId>org.fluttercode.datafactory</groupId>
                <artifactId>datafactory</artifactId>
                <version>${datafactory.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- infinispan -->
            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-commons</artifactId>
                <version>${infinispan.version}</version>
            </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-core</artifactId>
                <version>${infinispan.version}</version>
            </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-spring5-common</artifactId>
                <version>${infinispan.version}</version>
            </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-spring5-embedded</artifactId>
                <version>${infinispan.version}</version>
            </dependency>

            <dependency>
                <groupId>org.infinispan</groupId>
                <artifactId>infinispan-clustered-lock</artifactId>
                <version>${infinispan.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- spring boot -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-logging</artifactId>
        </dependency>

        <!--lombok -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- junit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</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>

        <!--H2 -->
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- openpojo -->
        <dependency>
            <groupId>com.openpojo</groupId>
            <artifactId>openpojo</artifactId>
            <version>${openpojo.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- equalsverifier -->
        <dependency>
            <groupId>nl.jqno.equalsverifier</groupId>
            <artifactId>equalsverifier</artifactId>
            <version>${equalsverifier.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- scm information -->
    <scm>
        <connection>scm:git:git@github.com:tuxdevelop/spring-batch-lightmin.git</connection>
        <developerConnection>scm:git:tuxdevelop@github.com:tuxdevelop/spring-batch-lightmin.git
        </developerConnection>
        <url>https://github.com/tuxdevelop/spring-batch-lightmin.git</url>
    </scm>


    <!-- distribution management -->
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <!-- build section -->
    <build>
        <!-- plugins -->
        <plugins>
            <plugin>
                <!-- compiler -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${maven-compiler-plugin.source}</source>
                    <target>${maven-compiler-plugin.target}</target>
                    <encoding>UTF-8</encoding>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                    <parameters>true</parameters>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven-deploy-plugin.version}</version>
            </plugin>
            <!-- surefire -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                </configuration>
            </plugin>
            <!-- jacoco -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-prepare-agent-integration</id>
                        <goals>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report-integration</id>
                        <goals>
                            <goal>report-integration</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules/>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsaife-plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includes>
                        <include>**/*IT.java</include>
                    </includes>
                </configuration>
            </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>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>signDeploy</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- sonatype -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </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.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>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <fixClassComment>true</fixClassComment>
                            <fixFieldComment>true</fixFieldComment>
                            <fixMethodComment>true</fixMethodComment>
                            <failOnError>false</failOnError>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
