<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2014, Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->

<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>3.0.0.Alpha2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

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

    <modules>
        <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>
