<?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>

    <artifactId>automation</artifactId>
    <groupId>com.tandt53</groupId>
    <packaging>pom</packaging>
    <version>1.0</version>
    <modules>
        <module>onboarding-common</module>
        <module>onboarding-common-test</module>
        <module>onboarding-rest-assured</module>
        <module>onboarding-ui</module>
        <module>onboarding-web</module>
        <module>onboarding-data-provider</module>
        <module>onboarding-mobile</module>
        <module>onboarding-cucumber</module>
        <module>onboarding-guice</module>
        <!--         <module>jacoco-summary</module> -->
    </modules>

    <name>Next Big Thing</name>
    <description>The project is a collection of modules that allows every Automation Test Engineer (ATE) to
        create/maintain automated test cases.
    </description>
    <url>https://github.com/tandt53/next-big-thing</url>

    <developers>
        <developer>
            <name>Tan Do The</name>
            <email>dothetan.040490@gmail.com</email>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/tandt53/next-big-thing.git</connection>
        <developerConnection>scm:git:ssh://github.com/tandt53/next-big-thing.git</developerConnection>
        <url>https://github.com/tandt53/next-big-thing/tree/master</url>
    </scm>

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

    <properties>
        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <log4j.version>2.19.0</log4j.version>
        <cucumber.version>7.8.1</cucumber.version>
        <selenium.version>4.5.2</selenium.version>
        <appium.version>8.2.0</appium.version>
        <skipTest>false</skipTest>
        <jacoco.version>0.8.6</jacoco.version>
        <jackson.version>2.13.2</jackson.version>
        <jackson-databind.version>2.13.4.2</jackson-databind.version>
    </properties>

    <profiles>

        <profile>
            <id>local-qc</id>
            <properties>
                <runner>local</runner>
                <env>qc</env>
            </properties>
        </profile>

        <profile>
            <id>ci-qc</id>
            <properties>
                <runner>ci</runner>
                <env>qc</env>
            </properties>
        </profile>

    </profiles>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>5.2.0</version>
            </dependency>

            <dependency>
                <groupId>com.github.dzieciou.testing</groupId>
                <artifactId>curl-logger</artifactId>
                <version>2.1.2</version>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log4j.version}</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-java</artifactId>
                <version>${selenium.version}</version>
            </dependency>

            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-api</artifactId>
                <version>${selenium.version}</version>
            </dependency>

            <dependency>
                <groupId>org.seleniumhq.selenium</groupId>
                <artifactId>selenium-support</artifactId>
                <version>${selenium.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>5.1.0</version>
            </dependency>

            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log4j.version}</version>
            </dependency>

            <!-- Extents report v3.1.0 -->
            <dependency>
                <groupId>com.aventstack</groupId>
                <artifactId>extentreports</artifactId>
                <version>3.1.0</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.11.0</version>
            </dependency>

            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi</artifactId>
                <version>5.2.3</version>
            </dependency>
            <!-- https://mvnrepository.com/artifact/org.apache.poi/poi-ooxml -->
            <dependency>
                <groupId>org.apache.poi</groupId>
                <artifactId>poi-ooxml</artifactId>
                <version>5.2.3</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>2.9.1</version>
            </dependency>

            <!-- core-api -->
            <!-- https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp -->
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>okhttp</artifactId>
                <version>4.10.0</version>
            </dependency>

            <!-- cucumber-junit -->
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-junit</artifactId>
                <version>${cucumber.version}</version>
            </dependency>

            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-java</artifactId>
                <version>${cucumber.version}</version>
            </dependency>

            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>cucumber-guice</artifactId>
                <version>${cucumber.version}</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/junit/junit -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
            </dependency>

            <!-- core-mobile -->
            <dependency>
                <groupId>io.appium</groupId>
                <artifactId>java-client</artifactId>
                <version>${appium.version}</version>
            </dependency>

            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>7.3.0</version>
            </dependency>

            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>1.18.16</version>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>31.1-jre</version>
            </dependency>

            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>0.9.12</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${jackson.version}</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson-databind.version}</version>
            </dependency>

            <!--            &lt;!&ndash; https://mvnrepository.com/artifact/commons-codec/commons-codec &ndash;&gt;-->
            <!--            <dependency>-->
            <!--                <groupId>commons-codec</groupId>-->
            <!--                <artifactId>commons-codec</artifactId>-->
            <!--                <version>1.15</version>-->
            <!--            </dependency>-->

            <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber6-jvm -->
            <dependency>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-cucumber7-jvm</artifactId>
                <version>2.19.0</version>
            </dependency>

            <!-- https://mvnrepository.com/artifact/io.cucumber/gherkin -->
            <dependency>
                <groupId>io.cucumber</groupId>
                <artifactId>gherkin</artifactId>
                <version>24.0.0</version>
            </dependency>


        </dependencies>


    </dependencyManagement>

    <build>
        <!-- Source directory configuration -->
        <!--<sourceDirectory>src</sourceDirectory> -->
        <plugins>
            <!-- Following plugin executes the testng tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>

                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <skipTests>${skipTest}</skipTests>
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <systemPropertyVariables>
                        <runner>${runner}</runner>
                        <env>${env}</env>
                    </systemPropertyVariables>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </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>2.9.1</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>1.5</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
