<?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">
    <parent>
        <groupId>org.wildfly.arquillian</groupId>
        <artifactId>integration-tests</artifactId>
        <version>5.1.0.Beta3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>junit5-tests</artifactId>
    <name>WildFly: Arquillian JUnit 5 Integration Tests</name>

    <dependencies>
        <!-- Test Dependencies -->
        <dependency>
            <groupId>jakarta.inject</groupId>
            <artifactId>jakarta.inject-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit5</groupId>
            <artifactId>arquillian-junit5-container</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.protocol</groupId>
            <artifactId>arquillian-protocol-servlet-jakarta</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.ejb</groupId>
            <artifactId>jakarta.ejb-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>test</scope>
        </dependency>
        <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>
        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-junit-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-container-managed</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.wildfly.plugins</groupId>
                <artifactId>wildfly-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <jboss.home>${jboss.home}</jboss.home>
                    </systemPropertyVariables>
                    <environmentVariables>
                        <JBOSS_HOME>${jboss.home}</JBOSS_HOME>
                    </environmentVariables>
                </configuration>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <excludedGroups>OverrideWebUri,engine-test-kit,cleanup-test</excludedGroups>
                        </configuration>
                    </execution>
                    <execution>
                        <id>override-web-uri</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <groups>OverrideWebUri</groups>
                            <systemPropertyVariables>
                                <arquillian.xml>override-web-uri-arquillian.xml</arquillian.xml>
                            </systemPropertyVariables>
                        </configuration>
                    </execution>
                    <execution>
                        <id>engine-test-kit</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <groups>engine-test-kit</groups>
                        </configuration>
                    </execution>
                    <!-- Note this must always be defined as the last execution. Tests in this group must be run in
                         their own JVM and must execute after all other tests.
                     -->
                    <execution>
                        <id>cleanup-tests</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <groups>cleanup-test</groups>
                            <reuseForks>false</reuseForks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>