<?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.roastedroot</groupId>
    <artifactId>quickjs4j-parent</artifactId>
    <version>0.0.13</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>quickjs4j-it</artifactId>
  <packaging>jar</packaging>
  <name>QuickJs4J - Annotations - IT</name>
  <description>Integration tests for the QuickJs4J annotations</description>

  <dependencies>
    <!-- Dummy dependency to force the order -->
    <dependency>
      <groupId>io.roastedroot</groupId>
      <artifactId>quickjs4j-processor</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>${maven-failsafe-plugin.version}</version>
        <configuration>
          <systemPropertyVariables>
            <itDir>${project.basedir}</itDir>
            <chicoryVersion>${project.version}</chicoryVersion>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-invoker-plugin</artifactId>
        <version>${maven-invoker-plugin.version}</version>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
          <cloneClean>true</cloneClean>
          <settingsFile>src/it/settings.xml</settingsFile>
          <postBuildHookScript>verify</postBuildHookScript>
          <addTestClassPath>true</addTestClassPath>
          <skipInvocation>${skipTests}</skipInvocation>
          <streamLogs>true</streamLogs>
          <invokerPropertiesFile>invoker.properties</invokerPropertiesFile>
          <scriptVariables>
            <version>${project.version}</version>
            <artifactId>${project.artifactId}</artifactId>
            <groupId>${project.groupId}</groupId>
          </scriptVariables>
        </configuration>
        <executions>
          <execution>
            <id>integration-tests</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>templating-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>filtering-java-templates</id>
            <goals>
              <goal>filter-sources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
