<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~  Copyright 2018 Red Hat, Inc.
 ~
 ~  Licensed under the Apache License, Version 2.0 (the "License");
 ~  you may not use this file except in compliance with the License.
 ~  You may obtain a copy of the License at
 ~
 ~    http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~  Unless required by applicable law or agreed to in writing, software
 ~  distributed under the License is distributed on an "AS IS" BASIS,
 ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ~  See the License for the specific language governing permissions and
 ~  limitations under the License.
  -->

<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>io.smallrye</groupId>
    <artifactId>smallrye-rest-client-testsuite-parent</artifactId>
    <version>1.2.2</version>
  </parent>

  <artifactId>smallrye-rest-client-testsuite-basic</artifactId>
  <name>SmallRye: MicroProfile Rest Client - Testsuite Basic</name>

  <dependencies>

    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-rest-client</artifactId>
    </dependency>

    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-config</artifactId>
    </dependency>

    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-rest-client-testsuite-common</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.eclipse.microprofile.fault-tolerance</groupId>
      <artifactId>microprofile-fault-tolerance-api</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-fault-tolerance</artifactId>
    </dependency>

    <dependency>
      <groupId>org.eclipse.microprofile.metrics</groupId>
      <artifactId>microprofile-metrics-api</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-metrics</artifactId>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>wildfly-servlet</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <environmentVariables>
                <JBOSS_HOME>${project.build.directory}/wildfly-servlet-${version.wildfly}</JBOSS_HOME>
              </environmentVariables>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack</id>
                <phase>process-test-classes</phase>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>org.wildfly</groupId>
                      <artifactId>wildfly-servlet-dist</artifactId>
                      <version>${version.wildfly}</version>
                      <type>zip</type>
                      <overWrite>false</overWrite>
                      <outputDirectory>${project.build.directory}</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
