<?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.tests</groupId>
        <artifactId>mule-tests</artifactId>
        <version>4.9.4</version>
    </parent>
    <artifactId>mule-tests-runner</artifactId>
    <packaging>jar</packaging>
    <name>Mule Test Runner</name>
    <description>Test Runner for Mule Integration Tests</description>

    <properties>
        <surefire.args>
            -XX:+IgnoreUnrecognizedVMOptions
            --add-opens=org.mule.test.runner/org.mule.test.runner.api=junit
            --add-opens=org.mule.test.runner/org.mule.test.runner.classification=junit
            --add-opens=org.mule.test.runner/org.mule.test.runner.classloader=junit
            --add-opens=org.mule.test.runner/org.mule.test.runner.maven=junit
            --add-opens=org.mule.test.runner/org.mule.test.runner.utils=junit
            ${surefire.args.base}
        </surefire.args>

        <javaModuleName>org.mule.test.runner</javaModuleName>
        
        <formatterConfigPath>../../formatter.xml</formatterConfigPath>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>        
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>execute</goal>
                        </goals>
                        <configuration>
                            <scripts>
                                <script>
                                    for (art in project.getArtifacts())
                                        project.properties['resolvedVersion.' + art.getArtifactId()] = art.getVersion()
                                </script>
                            </scripts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <!-- Maven Client dependencies -->
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-impl</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.vdurmont</groupId>
                    <artifactId>semver4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Mule Runtime dependencies -->
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-extensions-support</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-service</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-container</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-artifact-activation</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime.boot</groupId>
            <artifactId>mule-module-logging</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- TODO: MULE-19762 remove once forward compatibility is finished -->
        <dependency>
            <groupId>org.mule.sdk</groupId>
            <artifactId>mule-sdk-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <!-- TODO: MULE-19762 remove once forward compatibility is finished -->
        <dependency>
            <groupId>org.mule.sdk</groupId>
            <artifactId>mule-sdk-compatibility-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- 3rd party dependencies -->
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-allure</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-tests-unit</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-heisenberg-extension</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mule.tests</groupId>
            <artifactId>mule-petstore-extension</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
