<?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>org.drools.testcoverage</groupId>
    <artifactId>kie-maven-plugin-separate-model-tests-parent</artifactId>
    <version>7.3.0.Final</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>model-wrapper</artifactId>
  <packaging>jar</packaging>

  <name>KIE Integration :: KIE Maven Plugin Instrumented Model JAR Wrapper</name>

  <dependencies>
    <dependency>
      <!-- Artificial dependency to make sure that kie-maven-plugin is always built before this
           project - the wrapped kjar project needs the kie-maven-plugin to build.
           Without this dependency the parallel (-T) build sometimes fails. -->
      <groupId>org.kie</groupId>
      <artifactId>kie-maven-plugin</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <configuration>
          <cloneProjectsTo>${project.build.directory}/wrapped-project</cloneProjectsTo>
          <localRepositoryPath>${settings.localRepository}</localRepositoryPath>
          <pom>${project.basedir}/src/test/resources/model/pom.xml</pom>
          <streamLogs>true</streamLogs>
          <goals>
            <goal>install</goal>
          </goals>
          <filterProperties>
            <version.org.kie>${version.org.kie}</version.org.kie>
          </filterProperties>
        </configuration>
        <executions>
          <execution>
            <id>generate-test-resources</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
