<?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>com.mulesoft.mule.framework</groupId>
        <artifactId>mule-framework-tests</artifactId>
        <version>1.2.3</version>
    </parent>

    <artifactId>mule-framework-static-analysis-bom-tests</artifactId>

    <description>The purpose of these tests is to validate that everything works in a context in which the Framework's Static Analysis BOM is in the classpath and nothing else. Other modules test the static analysis usage modes, but they include dependencies for the other modes as well.</description>

    <properties>
        <frameworkTestBomVersion>${project.version}</frameworkTestBomVersion>

        <!-- TODO W-10624034 (MMP-581) - remove this and define apps in a module  -->
        <settingsFile>${java.io.tmpdir}/effective-settings.xml</settingsFile>
    </properties>

    <build>
        <testResources>
            <testResource>
                <filtering>true</filtering>
                <directory>${basedir}/src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <!-- This plugin copies the effective maven settings to a file so it can be used by MavenTestUtils. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-help-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>process-test-resources</phase>
                        <id>copy-settings</id>
                        <goals>
                            <goal>effective-settings</goal>
                        </goals>
                        <configuration>
                            <output>${settingsFile}</output>
                            <showPasswords>true</showPasswords>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <!-- TODO W-10624034 (MMP-581) - remove this and define apps in a module  -->
                        <mule.test.maven.artifacts.dir>noDir</mule.test.maven.artifacts.dir>
                        <settings.file>${settingsFile}</settings.file>
                        <maven.home>${maven.home}</maven.home>
                        <custom.local.repo>${project.build.directory}/custom-repo</custom.local.repo>
                        <project.build.directory>${project.build.directory}</project.build.directory>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.mulesoft.mule.framework</groupId>
            <artifactId>mule-framework-api</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.framework</groupId>
            <artifactId>mule-framework-static-analysis-bom</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.framework</groupId>
            <artifactId>mule-framework-test-utils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.framework</groupId>
            <artifactId>mule-framework-test-connectors-resolver</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit5</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit-pioneer</groupId>
            <artifactId>junit-pioneer</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

</project>