<?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.plugins</groupId>
        <artifactId>wildfly-maven-plugin-parent</artifactId>
        <version>5.0.0.Final</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>wildfly-maven-plugin-tests</artifactId>
    <packaging>pom</packaging>

    <modules>
        <module>bootable-tests</module>
        <module>standalone-tests</module>
        <module>domain-tests</module>
        <module>shared</module>
    </modules>

    <properties>
        <jboss.home>${project.build.directory}${file.separator}wildfly</jboss.home>

        <wildfly.test.config.dir>${project.build.testOutputDirectory}</wildfly.test.config.dir>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jboss.galleon</groupId>
                <artifactId>galleon-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>provision-wildfly</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>provision</goal>
                        </goals>
                        <configuration>
                            <feature-packs>
                                <feature-pack>
                                    <location>wildfly@maven(org.jboss.universe:community-universe)#${version.org.wildfly}</location>
                                </feature-pack>
                            </feature-packs>
                            <install-dir>${project.build.directory}/wildfly</install-dir>
                            <plugin-options>
                                <jboss-fork-embedded>${plugin.fork.embedded}</jboss-fork-embedded>
                            </plugin-options>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <jboss.home>${jboss.home}</jboss.home>
                        <jboss-as.home>${jboss.home}</jboss-as.home>
                        <wildfly.test.version>${version.org.wildfly}</wildfly.test.version>
                        <wildfly.management.port>10099</wildfly.management.port>
                        <wildfly.test.config.dir>${wildfly.test.config.dir}</wildfly.test.config.dir>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>


</project>
