<?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>
        <groupId>de.gematik.test</groupId>
        <artifactId>tiger</artifactId>
        <version>1.3.0</version>
    </parent>

    <artifactId>tiger-test-utils</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
        </dependency>
        <dependency>
            <groupId>de.gematik.test</groupId>
            <artifactId>tiger-rbel</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>de.gematik.test</groupId>
            <artifactId>tiger-common</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>1.18.20.0</version>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>delombok</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <addOutputDirectory>false</addOutputDirectory>
                            <sourceDirectory>src/main/java</sourceDirectory>
                            <outputDirectory>
                                ${project.build.directory}/delombok
                            </outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.5.0</version>
                <configuration>
                    <doclint>none</doclint>
                    <sourcepath>${project.build.directory}/delombok</sourcepath>
                    <tags>
                        <tag>
                            <name>testenv</name>
                            <placement>a</placement>
                            <head>Testenvironment Variables:</head>
                        </tag>
                        <tag>
                            <name>gematik.context.out</name>
                            <placement>a</placement>
                            <head>Context OUT:</head>
                        </tag>
                        <tag>
                            <name>gematik.context.in</name>
                            <placement>a</placement>
                            <head>Context INPUT:</head>
                        </tag>
                    </tags>
                </configuration>
            </plugin>
            <!-- end create reusable test jar part -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${version.maven.failsafe}</version>
                <executions>
                    <execution>
                        <id>run-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <argLine>${failsafe.jacoco.args}</argLine>
                    <includes>
                        <include>**/TestContextFeatureTest.java</include>
                    </includes>
                    <skipITs>false</skipITs>
                    <systemPropertyVariables>
                        <TIGER_TESTENV_CFGFILE>src/test/resources/testdata/noServersActive.yaml</TIGER_TESTENV_CFGFILE>
                    </systemPropertyVariables>
                    <threadCount>16</threadCount>
                    <forkCount>2</forkCount>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.serenity-bdd.maven.plugins</groupId>
                <artifactId>serenity-maven-plugin</artifactId>
                <version>${version.serenity.maven.plugin}</version>
                <dependencies>
                    <dependency>
                        <groupId>net.serenity-bdd</groupId>
                        <artifactId>serenity-core</artifactId>
                        <version>${version.serenity.core}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>serenity-reports</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>jacoco-maven-plugin</artifactId>
                <groupId>org.jacoco</groupId>
            </plugin>
            <plugin>
                <artifactId>sonar-maven-plugin</artifactId>
                <groupId>org.sonarsource.scanner.maven</groupId>
            </plugin>
        </plugins>
    </build>
</project>