<?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>org.wildfly.swarm</groupId>
    <artifactId>wildfly-swarm</artifactId>
    <version>2017.2.0</version>
    <relativePath>../</relativePath>
  </parent>

  <groupId>org.wildfly.swarm.servers</groupId>
  <artifactId>standalone-servers</artifactId>

  <name>Standalone Servers</name>
  <description>Standalone Servers</description>

  <packaging>pom</packaging>

  <build>
    <finalName>${project.artifactId}</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.wildfly.swarm</groupId>
          <artifactId>wildfly-swarm-plugin</artifactId>
          <version>2017.2.0</version>
          <executions>
            <execution>
              <id>package</id>
              <goals>
                <goal>package</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <failOnError>false</failOnError>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <modules>
    <module>keycloak</module>
    <module>management-console</module>
    <module>microprofile</module>
    <module>swagger-ui</module>
  </modules>

  <profiles>
    <profile>
      <id>uberjar</id>
      <properties>
        <wildfly-swarm.useUberJar>true</wildfly-swarm.useUberJar>
      </properties>
    </profile>
    <profile>
      <id>run-tests</id>
      <activation>
        <property>
          <name>!skipTests</name>
        </property>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.wildfly.swarm</groupId>
              <artifactId>wildfly-swarm-plugin</artifactId>
              <version>2017.2.0</version>
              <executions>
                <execution>
                  <id>start</id>
                  <phase>pre-integration-test</phase>
                  <goals>
                    <goal>start</goal>
                  </goals>
                  <configuration>
                    <stdoutFile>target/stdout.log</stdoutFile>
                    <stderrFile>target/stderr.log</stderrFile>
                  </configuration>
                </execution>
                <execution>
                  <id>stop</id>
                  <phase>post-integration-test</phase>
                  <goals>
                    <goal>stop</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
                <configuration>
                  <testSourceDirectory>src/it/java</testSourceDirectory>
                </configuration>
              </execution>
              <execution>
                <id>verify</id>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
