<?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">
    <parent>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-tck-parent</artifactId>
        <version>999-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>quarkus-tck-microprofile-rest-client</artifactId>
    <name>Quarkus - TCK - MicroProfile REST Client</name>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <!-- Disable quarkus optimization -->
                        <quarkus.arc.remove-unused-beans>false</quarkus.arc.remove-unused-beans>
                        <io.quarkus.arquillian.copy-fields>true</io.quarkus.arquillian.copy-fields>
                    </systemPropertyVariables>
                    <!-- This workaround allows us to run a single test using
                        the "test" system property -->
                    <!-- https://issues.apache.org/jira/browse/SUREFIRE-569 -->
                    <dependenciesToScan>
                        <dependency>org.eclipse.microprofile.rest.client:microprofile-rest-client-tck</dependency>
                    </dependenciesToScan>
                    <reuseForks>false</reuseForks>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <!-- Not actually tests that should be run -->
                        <exclude>org.eclipse.microprofile.rest.client.tck.WiremockArquillianTest</exclude>
                        <exclude>org.eclipse.microprofile.rest.client.tck.ssl.AbstractSslTest</exclude>

                        <!-- ConversationScope not supported in Quarkus -->
                        <exclude>org.eclipse.microprofile.rest.client.tck.cditests.HasConversationScopeTest</exclude>

                        <!-- We have our own version of these tests which set up a config environment -->
                        <exclude>org.eclipse.microprofile.rest.client.tck.InvokeWithJsonBProviderTest</exclude>
                        <exclude>org.eclipse.microprofile.rest.client.tck.InvokeWithJsonPProviderTest</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>uk.co.deliverymind</groupId>
                <artifactId>wiremock-maven-plugin</artifactId>
                <version>2.7.0</version>
                <executions>
                    <execution>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <dir>target/classes</dir>
                            <params>--port=8765 --verbose</params>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-arquillian</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-rest-client</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jsonp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-json-p-provider</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jsonb</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-json-binding-provider</artifactId>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-undertow</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.microprofile.rest.client</groupId>
            <artifactId>microprofile-rest-client-tck</artifactId>
            <version>${microprofile-rest-client-api.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-servlet</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.eclipse.jetty</groupId>
                    <artifactId>jetty-servlets</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>javax.servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
        </dependency>
    </dependencies>
</project>
