<?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>

    <parent>
        <artifactId>mrchecker-test-framework</artifactId>
        <groupId>com.capgemini.mrchecker</groupId>
        <version>2023.10.10</version>
    </parent>

    <artifactId>mrchecker-core-module</artifactId>
    <version>2023.10.10</version>
    <packaging>jar</packaging>
    <name>MrChecker - Test core - Module</name>
    <description>MrChecker Test Framework Core is responsible for:
        * Test report with logs and/or screenshots
        * Test groups/tags
        * Data Driven (inside test case, external file)
        * Test case parallel execution
        * BDD - Gherkin – Cucumber approach
        * Run on independent OperatingSystem
        * Externalize test environment (DEV, QA, PROD)
        * Adding analytics source code
        * Update Observers
        Based on Junit5
    </description>
    <url>https://github.com/devonfw/devonfw-testing</url>

    <organization>
        <name>Capgemini - Software Solution Center</name>
        <url>https://capgeminisoftware.pl/</url>
    </organization>

    <developers>
        <developer>
            <name>Lukasz Stefaniszyn</name>
            <email>lukasz.stefaniszyn@capgemini.com</email>
            <organization>Capgemini - Software Solution Center</organization>
            <organizationUrl>https://capgeminisoftware.pl</organizationUrl>
        </developer>
        <developer>
            <name>Mariusz Kowalski</name>
            <email>mariusz.kowalski@capgemini.com</email>
            <organization>Capgemini - Nearshore Test Center - Poland</organization>
            <organizationUrl>http://nsc.capgemini.com/nearshoretestcenter</organizationUrl>
        </developer>
        <developer>
            <name>Michal Babiarz</name>
            <email>michal.babiarz@capgemini.com</email>
            <organization>Capgemini - Nearshore Test Center - Poland</organization>
            <organizationUrl>http://nsc.capgemini.com/nearshoretestcenter</organizationUrl>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/devonfw/devonfw-testing.git</connection>
        <developerConnection>scm:git:ssh://github.com:devonfw/devonfw-testing.git</developerConnection>
        <url>http://github.com/devonfw/devonfw-testing/tree/master</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF8</project.build.sourceEncoding>

        <!-- Guava is a set of core libraries -->
        <google.guava.version>32.1.2-jre</google.guava.version>

        <!-- Logger -->
        <log4j.version>2.20.0</log4j.version>
        <slf4j.version>2.0.9</slf4j.version>

        <!-- Cucumber version -->
        <cucumber.version>7.14.0</cucumber.version>
        <gherkin.cucumber.version>27.0.0</gherkin.cucumber.version>
        <cucumber-reporting.version>5.7.7</cucumber-reporting.version>

        <!--GSON-->
        <gson.version>2.10.1</gson.version>
        <!--ASSERTJ-->
        <assertj.core.version>3.24.2</assertj.core.version>
    </properties>

    <dependencies>
        <!-- Guava is a set of core libraries -->
        <!-- NOTE: given Guava lib is not backward compatible, therefore
            must be used as first dependency import to overwrite any other imports -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${google.guava.version}</version>
        </dependency>

        <!--This dependency is necessary for Logger. -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>${log4j.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <!--This dependency is necessary for Allure generator plugin. -->
        <dependency>
            <!-- Test listener. Binds Junit exec to Allure annotation -->
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit5</artifactId>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-java-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit-platform</artifactId>
        </dependency>
        <dependency>
            <!-- Allure report generator -->
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-maven</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>

        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
        </dependency>

        <!-- Dependencies for Cucumber -->
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-core</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>cucumber-junit-platform-engine</artifactId>
            <version>${cucumber.version}</version>
        </dependency>
        <dependency>
            <groupId>net.masterthought</groupId>
            <artifactId>cucumber-reporting</artifactId>
            <version>${cucumber-reporting.version}</version>
        </dependency>

        <dependency>
            <groupId>io.cucumber</groupId>
            <artifactId>gherkin</artifactId>
            <version>${gherkin.cucumber.version}</version>
        </dependency>


        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-swing-junit</artifactId>
            <version>3.17.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.core.version}</version>
        </dependency>

        <!--GSON-->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson.version}</version>
        </dependency>

        <dependency>
            <groupId>com.intellij</groupId>
            <artifactId>forms_rt</artifactId>
            <version>7.0.3</version>
        </dependency>
    </dependencies>

    <!-- Build goals/actions -->
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <id>data-encryption-app</id>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <includes>
                                    <include>org.jasypt:jasypt:*</include>
                                    <include>com.intellij:forms_rt:*</include>
                                </includes>
                            </artifactSet>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.capgemini.mrchecker.test.core.utils.DataEncryptionApp</mainClass>
                                </transformer>
                            </transformers>
                            <finalName>DataEncryptionApp</finalName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <!-- here the phase you need -->
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.outputDirectory}
                            </outputDirectory>
                            <resources>
                                <resource>
                                    <directory>
                                        ${project.basedir}/src/test/resources
                                    </directory>
                                    <includes>
                                        <include>log4j2.xml</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>