<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->

<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>org.wildfly.testing</groupId>
        <artifactId>wildfly-testing-tools-parent</artifactId>
        <version>1.0.0.Alpha4</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>wildfly-junit-api</artifactId>
    <name>WildFly JUnit API</name>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly.testing</groupId>
                <artifactId>wildfly-testing-tools-project-bom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.plugins</groupId>
            <artifactId>wildfly-plugin-tools</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-testkit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <systemPropertyVariables>
                                <jboss.home>${project.build.testOutputDirectory}/fake-modules</jboss.home>
                            </systemPropertyVariables>
                            <groups>system-property</groups>
                        </configuration>
                    </execution>
                    <execution>
                        <id>env-var</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <JBOSS_HOME>${project.build.testOutputDirectory}/fake-modules</JBOSS_HOME>
                            </environmentVariables>
                            <groups>env-var</groups>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
