<?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>io.quarkus</groupId>
        <artifactId>quarkus-integration-test-kubernetes-parent</artifactId>
        <version>999-SNAPSHOT</version>
        <relativePath>../</relativePath>
    </parent>

    <artifactId>quarkus-integration-test-kubernetes-invoker</artifactId>
    <name>Quarkus - Integration Tests - Kubernetes - Invoker</name>
    <description>Kubernetes integration tests that need to use the maven invoker because they test various dependency related scenarios</description>

    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-test-maven</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-kubernetes</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.dekorate</groupId>
            <artifactId>kubernetes-annotations</artifactId>
            <classifier>noapt</classifier>
        </dependency>
        <dependency>
            <groupId>io.dekorate</groupId>
            <artifactId>openshift-annotations</artifactId>
            <classifier>noapt</classifier>
        </dependency>
        <dependency>
            <groupId>io.dekorate</groupId>
            <artifactId>knative-annotations</artifactId>
            <classifier>noapt</classifier>
        </dependency>
    </dependencies>
    <build>
        <testResources>
            <testResource>
                <directory>src/it</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <cloneClean>true</cloneClean>
                    <postBuildHookScript>verify</postBuildHookScript>
                    <addTestClassPath>true</addTestClassPath>
                    <skipInvocation>${skipTests}</skipInvocation>
                    <streamLogs>true</streamLogs>
                    <invokerPropertiesFile>invoker.properties</invokerPropertiesFile>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>