<?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>io.ayte</groupId>
    <artifactId>twill</artifactId>
    <version>0.2.5</version>
    <packaging>pom</packaging>

    <name>Ayte :: Progenitor Object Model</name>
    <description>
        This is the root POM all other Ayte projects rely on.
    </description>
    <url>https://github.com/ayte-io/java-pom</url>
    <inceptionYear>2018</inceptionYear>
    <organization>
        <name>Ayte Labs</name>
        <url>https://ayte.io</url>
    </organization>

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

    <repositories>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>jCenter</id>
            <name>jCenter</name>
            <url>https://jcenter.bintray.com</url>
        </repository>
    </repositories>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
        <license>
            <name>The Universal Permissive License (UPL), Version 1.0</name>
            <url>https://opensource.org/licenses/UPL</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Etki</name>
            <email>etki@ayte.team</email>
            <organization>Ayte Labs</organization>
            <organizationUrl>https://ayte.io</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/ayte-io/java-pom.git</connection>
        <url>https://github.com/ayte-io/java-pom</url>
    </scm>

    <modules>
        <module>src/foss</module>
        <module>src/proprietary</module>
        <module>src/validator</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <java.version.source>1.8</java.version.source>
        <java.version.target>1.8</java.version.target>

        <maven.compiler.source>${java.version.source}</maven.compiler.source>
        <maven.compiler.target>${java.version.target}</maven.compiler.target>

        <git.branch>master</git.branch>

        <plugin.compiler.version>3.8.0</plugin.compiler.version>
        <plugin.jar.version>3.1.1</plugin.jar.version>
        <plugin.source.version>3.0.1</plugin.source.version>
        <plugin.javadoc.version>3.0.1</plugin.javadoc.version>
        <plugin.surefire.version>2.22.1</plugin.surefire.version>
        <plugin.failsafe.version>2.22.1</plugin.failsafe.version>
        <plugin.shade.version>3.2.1</plugin.shade.version>
        <plugin.assembly.version>3.1.0</plugin.assembly.version>
        <plugin.toolchains.version>1.1</plugin.toolchains.version>
        <plugin.gpg.version>1.6</plugin.gpg.version>
        <plugin.report.version>2.9</plugin.report.version>
        <plugin.nexus-staging.version>1.6.8</plugin.nexus-staging.version>

        <plugin.lombok.version>1.18.4.0</plugin.lombok.version>
        <plugin.clover.version>4.2.1</plugin.clover.version>
        <plugin.jacoco.version>0.8.3</plugin.jacoco.version>
        <plugin.checkstyle.version>3.0.0</plugin.checkstyle.version>
        <plugin.pmd.version>3.11.0</plugin.pmd.version>
        <plugin.spotbugs.version>3.1.11</plugin.spotbugs.version>
        <plugin.allure.version>2.9</plugin.allure.version>
        <plugin.sonar-scanner.version>3.6.0.1398</plugin.sonar-scanner.version>
        <plugin.git-commit-id.version>2.2.6</plugin.git-commit-id.version>
        <plugin.moditect.version>1.0.0.Beta2</plugin.moditect.version>

        <plugin.jxr.version>3.0.0</plugin.jxr.version>

        <lombok.version>1.18.8</lombok.version>

        <junit.jupiter.version>5.3.1</junit.jupiter.version>
        <junit.platform.version>1.2.0</junit.platform.version>
        <mockito.version>2.23.4</mockito.version>
        <hamcrest.version>1.3</hamcrest.version>

        <aspectjweaver.version>1.9.2</aspectjweaver.version>

        <allure.version>2.8.1</allure.version>
        <allure.report.version>2.8.1</allure.report.version>
        <!--suppress UnresolvedMavenProperty -->
        <allure.install.directory>${session.executionRootDirectory}/target/allure/cli</allure.install.directory>
        <!--suppress UnresolvedMavenProperty -->
        <allure.results.directory>${session.executionRootDirectory}/target/allure/results</allure.results.directory>
        <!--suppress UnresolvedMavenProperty -->
        <allure.report.directory>${session.executionRootDirectory}/target/site/allure</allure.report.directory>

        <sonar.organization>ayte</sonar.organization>
        <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        <!--suppress UnresolvedMavenProperty -->
        <sonar.projectKey>${project.groupId}:${project.artifactId}</sonar.projectKey>
        <!--suppress UnresolvedMavenProperty -->
        <sonar.login>${env.SONAR_API_TOKEN}</sonar.login>

        <packaging.automatic-module-name>${project.groupId}.${project.artifactId}</packaging.automatic-module-name>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
                <scope>provided</scope>
            </dependency>

            <!-- Test Dependencies -->
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrest.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-junit5</artifactId>
                <version>${allure.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>${junit.jupiter.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-api</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.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <scope>test</scope>
            </dependency>
            <!-- /Test Dependencies -->
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${plugin.compiler.version}</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-parameters</arg>
                        </compilerArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${plugin.jar.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${plugin.surefire.version}</version>
                    <configuration>
                        <argLine>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectjweaver.version}/aspectjweaver-${aspectjweaver.version}.jar"</argLine>
                        <systemProperties>
                            <property>
                                <name>junit.jupiter.extensions.autodetection.enabled</name>
                                <value>true</value>
                            </property>
                            <property>
                                <name>allure.results.directory</name>
                                <value>${allure.results.directory}</value>
                            </property>
                        </systemProperties>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjweaver</artifactId>
                            <version>${aspectjweaver.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${plugin.failsafe.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${plugin.shade.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${plugin.assembly.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-toolchains-plugin</artifactId>
                    <version>${plugin.toolchains.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${plugin.report.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${plugin.source.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>${plugin.javadoc.version}</version>
                    <configuration>
                        <additionalOptions>-html5</additionalOptions>
                    </configuration>
                    <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>${plugin.gpg.version}</version>
                    <executions>
                        <execution>
                            <id>sign</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                        </gpgArguments>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${plugin.nexus-staging.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>sonatype.org</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.projectlombok</groupId>
                    <artifactId>lombok-maven-plugin</artifactId>
                    <version>${plugin.lombok.version}</version>
                </plugin>

                <plugin>
                    <groupId>io.qameta.allure</groupId>
                    <artifactId>allure-maven</artifactId>
                    <version>${plugin.allure.version}</version>

                    <executions>
                        <execution>
                            <phase>site</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.openclover</groupId>
                    <artifactId>clover-maven-plugin</artifactId>
                    <version>${plugin.clover.version}</version>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${plugin.jacoco.version}</version>

                    <executions>
                        <execution>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>site</phase>
                            <goals>
                                <goal>report-aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${plugin.pmd.version}</version>
                    <configuration>
                        <targetJdk>${java.version.source}</targetJdk>
                    </configuration>
                </plugin>

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

                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${plugin.spotbugs.version}</version>
                    <configuration>
                        <xmlOutput>true</xmlOutput>
                        <xmlOutputDirectory>${project.build.directory}/site/spotbugs</xmlOutputDirectory>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>${plugin.sonar-scanner.version}</version>
                </plugin>

                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>${plugin.git-commit-id.version}</version>
                    <executions>
                        <execution>
                            <id>execute</id>
                            <goals>
                                <goal>revision</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.moditect</groupId>
                    <artifactId>moditect-maven-plugin</artifactId>
                    <version>${plugin.moditect.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

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

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
