<?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>
    <artifactId>quarkus-extensions</artifactId>
    <groupId>org.kie.kogito</groupId>
    <version>1.29.0.Final</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>kogito-quarkus-test-list</artifactId>
  <name>Kogito :: Quarkus Test List</name>
  <description>Publishes a list of integration tests in XML format that should be run by the Quarkus Platform
  </description>

  <packaging>pom</packaging>

  <properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <test.list.file.location>${project.build.directory}/kogito-quarkus-test-list.xml</test.list.file.location>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.l2x6.rpkgtests</groupId>
          <artifactId>rpkgtests-maven-plugin</artifactId>
          <version>${version.rpkgtests.maven.plugin}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.l2x6.rpkgtests</groupId>
        <artifactId>rpkgtests-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>test-list-generate</id>
            <goals>
              <goal>create-test-jars-file</goal>
            </goals>
            <phase>generate-resources</phase>
            <configuration>
              <testJarsPath>${test.list.file.location}</testJarsPath>
              <activatingPropertyName>quarkus.test.list.include</activatingPropertyName>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>${version.build.helper.plugin}</version>
        <executions>
          <execution>
            <id>attach-test-list</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${test.list.file.location}</file>
                  <type>xml</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
