<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         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.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>com.marmoush</groupId>
    <artifactId>jbom</artifactId>
    <version>0.3.5</version>
    <packaging>pom</packaging>

    <name>${project.artifactId}</name>
    <description>Java Bom</description>
    <url>https://marmoush.com</url>
    <organization>
        <name>marmoush.com</name>
        <url>https://marmoush.com</url>
    </organization>

    <properties>
        <!--Java and Maven -->
        <java.version>13</java.version>
        <maven.version>3.6.1</maven.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Plugins -->
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M4</maven-surefire-plugin.version>
        <maven-failsafe-plugin.version>3.0.0-M4</maven-failsafe-plugin.version>
        <maven-assembly-plugin.version>3.2.0</maven-assembly-plugin.version>

        <!-- Reporting Plugins-->
        <maven-site-plugin.version>3.8.2</maven-site-plugin.version>
        <maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>

        <!-- Testing Plugins -->
        <maven-sonar-plugin.version>3.6.0.1398</maven-sonar-plugin.version>
        <jacoco-plugin.version>0.8.4</jacoco-plugin.version>
        <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco/jacoco.xml
        </sonar.coverage.jacoco.xmlReportPaths>

        <!--Compile Deps-->
        <reactor.version>Dysprosium-RELEASE</reactor.version>
        <vavr.version>0.10.2</vavr.version>
        <gson.version>2.8.5</gson.version>
        <yamlbeans.version>1.13</yamlbeans.version>
        <logging.version>2.12.0</logging.version>
        <argon2.version>2.5</argon2.version>

        <!--Test Deps-->
        <junit.jupiter.version>5.5.2</junit.jupiter.version>
        <junit.assertj.version>3.11.1</junit.assertj.version>
    </properties>

    <distributionManagement>
        <site>
            <id>${project.artifactId}-site</id>
            <url>ftp://marmoush.com/</url>
        </site>
        <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>
    <repositories>
        <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <repository>
            <id>spring-snapshots</id>
            <name>Maven Repository Switchboard</name>
            <url>https://repo.spring.io/libs-snapshot</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <build>
        <plugins>
            <!--======================================================================================== -->
            <!-- Building Plugins   -->
            <!--======================================================================================== -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven-assembly-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven-compiler-plugin.version}</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <release>${java.version}</release>
                    <fork>true</fork>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                    <compilerArgs>
                        <!-- <arg>-Werror</arg> -->
                        <!--<arg>-Xlint:serial</arg>-->
                        <arg>-Xlint:cast</arg>
                        <arg>-Xlint:classfile</arg>
                        <arg>-Xlint:deprecation</arg>
                        <arg>-Xlint:divzero</arg>
                        <arg>-Xlint:fallthrough</arg>
                        <arg>-Xlint:finally</arg>
                        <arg>-Xlint:options</arg>
                        <arg>-Xlint:overrides</arg>
                        <arg>-Xlint:path</arg>
                        <arg>-Xlint:rawtypes</arg>
                        <arg>-Xlint:static</arg>
                        <arg>-Xlint:try</arg>
                        <arg>-Xlint:unchecked</arg>
                        <arg>-Xlint:varargs</arg>
                        <arg>-Xlint:-processing</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <!--======================================================================================== -->
            <!-- Documentation Plugins-->
            <!--======================================================================================== -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven-site-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${maven-project-info-reports-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</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>3.1.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--======================================================================================== -->
            <!-- Unit Testing Plugins -->
            <!--======================================================================================== -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/Test*.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*Tests.java</include>
                        <include>**/*TestCase.java</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
            </plugin>
            <!--======================================================================================== -->
            <!-- Integration Test Plugins  -->
            <!--======================================================================================== -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsafe-plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!--======================================================================================== -->
            <!-- Finding Bugs and Quality Plugins  -->
            <!--======================================================================================== -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-plugin.version}</version>
                <executions>
                    <execution>
                        <id>jacoco-create-exec-files</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-report</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-bom</artifactId>
                <version>${reactor.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--======================================================================================== -->
        <!-- Reactive Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.projectreactor.netty</groupId>
            <artifactId>reactor-netty</artifactId>
        </dependency>
        <dependency>
            <groupId>io.projectreactor</groupId>
            <artifactId>reactor-test</artifactId>
            <scope>test</scope>
        </dependency>
        <!--======================================================================================== -->
        <!-- Functional Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>io.vavr</groupId>
            <artifactId>vavr</artifactId>
            <version>${vavr.version}</version>
        </dependency>
        <dependency>
            <groupId>io.vavr</groupId>
            <artifactId>vavr-gson</artifactId>
            <version>${vavr.version}</version>
        </dependency>
        <!--======================================================================================== -->
        <!-- Json Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>
        <!--======================================================================================== -->
        <!-- Yaml Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>com.esotericsoftware.yamlbeans</groupId>
            <artifactId>yamlbeans</artifactId>
            <version>${yamlbeans.version}</version>
        </dependency>
        <!--======================================================================================== -->
        <!-- Logging Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${logging.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${logging.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>${logging.version}</version>
        </dependency>

        <!--======================================================================================== -->
        <!-- Security Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>de.mkammerer</groupId>
            <artifactId>argon2-jvm</artifactId>
            <version>${argon2.version}</version>
        </dependency>

        <!--======================================================================================== -->
        <!-- Testing Dependencies -->
        <!--======================================================================================== -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${junit.assertj.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <!--======================================================================================== -->
            <!-- Sonar Profile   -->
            <!--======================================================================================== -->
            <id>sonar</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${maven-sonar-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sonar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!--======================================================================================== -->
            <!-- Local Deployment Profile   -->
            <!--======================================================================================== -->
            <id>local_deployment</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</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>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!--======================================================================================== -->
            <!-- Travis Deployment Profile   -->
            <!--======================================================================================== -->
            <id>travis_deployment</id>
            <properties>
                <gpg.executable>gpg</gpg.executable>
                <gpg.defaultKeyring>true</gpg.defaultKeyring>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <!--suppress UnresolvedMavenProperty -->
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</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>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>



