<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.mule.distributions</groupId>
        <artifactId>mule-distributions</artifactId>
        <version>4.6.7</version>
    </parent>
    <artifactId>mule-distro-tests</artifactId>
    <packaging>jar</packaging>
    <name>Mule Distribution Tests</name>

    <properties>
        <javaModuleName>org.mule.distribution.test</javaModuleName>
        <skipExportTests>false</skipExportTests>
        <formatterConfigPath>../formatter.xml</formatterConfigPath>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Dfile.encoding=UTF-8 -Xmx1024m -Xms256m -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectjVersion}/aspectjweaver-${aspectjVersion}.jar -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile='${session.executionRootDirectory}/target/jacoco.exec'</argLine>
                    <workingDirectory>${project.build.directory}</workingDirectory>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>io.qameta.allure.junit4.AllureJunit4</value>
                        </property>
                    </properties>
                    <systemProperties>
                        <property>
                            <name>allure.results.directory</name>
                            <value>${project.build.directory}/allure-results</value>
                        </property>
                    </systemProperties>
                    <systemPropertyVariables>
                        <mule.distribution>${org.mule.distributions:mule-standalone:zip}</mule.distribution>
                        <scheduler.service>${org.mule.services:mule-service-scheduler:zip}</scheduler.service>
                        <http.service>${org.mule.services:mule-service-http:zip}</http.service>
                        <el.service>${com.mulesoft.services:mule-service-weave-ee:zip}</el.service>
                        <workingDirectory>${project.build.directory}</workingDirectory>
                    </systemPropertyVariables>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectjVersion}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>properties</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>testResources</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <includeEmptyDirs>true</includeEmptyDirs>
                    <resources>
                        <resource>
                            <directory>src/test/resources</directory>
                            <filtering>true</filtering>
                        </resource>
                    </resources>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Allure annotations -->
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-allure</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-infrastructure</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-unit</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.distributions</groupId>
            <artifactId>mule-standalone</artifactId>
            <version>${project.version}</version>
            <type>zip</type>
        </dependency>
    </dependencies>

</project>
