<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-graphql-server-parent</artifactId>
        <version>2.18.2</version>
    </parent>

    <artifactId>smallrye-graphql-tck</artifactId>

    <name>SmallRye: GraphQL Server :: TCK</name>


    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.smallrye.testing</groupId>
                <artifactId>smallrye-testing-bom-tck</artifactId>
                <version>${version.smallrye.testing}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.eclipse.microprofile.graphql</groupId>
            <artifactId>microprofile-graphql-tck</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.testng</groupId>
            <artifactId>arquillian-testng-container</artifactId>
        </dependency>
        <dependency>
            <groupId>io.smallrye.testing</groupId>
            <artifactId>smallrye-testing-tck-jetty</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.inject</groupId>
                    <artifactId>javax.inject</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.junit.jupiter</groupId>
                    <artifactId>junit-jupiter</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse</groupId>
            <artifactId>yasson</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye.config</groupId>
            <artifactId>smallrye-config</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>smallrye-context-propagation</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>mutiny</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye.reactive</groupId>
            <artifactId>mutiny-smallrye-context-propagation</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.smallrye</groupId>
            <artifactId>smallrye-graphql-servlet</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>bson</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>compile</scope>
            <version>7.12.0</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <dependenciesToScan>
                        <dependency>org.eclipse.microprofile.graphql:microprofile-graphql-server-tck</dependency> <!-- New 2.1-SNAPSHOT -->
                        <dependency>org.eclipse.microprofile.graphql:microprofile-graphql-tck</dependency> <!-- Old 2.0.x -->
                    </dependenciesToScan>
                    <suiteXmlFiles>
                        <suiteXmlFile>testng.xml</suiteXmlFile>
                    </suiteXmlFiles>
<!--                    <systemProperties>-->
<!--                        -->
<!--                    </systemProperties>-->
                    <systemPropertyVariables>
                        <smallrye.graphql.federation.enabled>true</smallrye.graphql.federation.enabled>
                        <java.util.logging.config.file>${project.basedir}/src/test/resources/logging.properties</java.util.logging.config.file>
                    </systemPropertyVariables>
                    <skip>true</skip> <!-- FIXME!!!!! TCK fails intermittently in the CI -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <configuration>
                    <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <configuration>
                            <includes>
                                <include>**/apps/**</include>
                            </includes>
                        </configuration>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>    
    </build>

    <profiles>
        <profile>
            <id>coverage</id>
            <properties>
                <argLine>@{jacocoArgLine}</argLine>
            </properties>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>report-aggregate</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report-aggregate</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
