<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.kie.kogito</groupId>
    <artifactId>integration-tests</artifactId>
    <version>1.11.0.Final</version>
  </parent>
  <artifactId>integration-tests-springboot</artifactId>
  <name>Kogito :: Integration Tests :: Spring Boot</name>

  <dependencies>
    <!-- All the dependency of this module are here just to make Maven reactor aware that invoker tests need them -->
    <!-- NOTE: don't change their scope because otherwise maven-invoker-plugin is not going to install them in localRepositoryPath  -->
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-bom</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-spring-boot-bom</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-kie7-bom</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-maven-plugin</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-spring-boot-starter</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-process-svg</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-messaging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-spring-boot-test-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-process-management</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-task-management</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-monitoring-prometheus</artifactId>
    </dependency>

  </dependencies>

  <profiles>
    <profile>
      <id>default</id>
      <activation>
        <property>
          <name>!productized</name>
        </property>
      </activation>
      <dependencies>
        <!-- Persistence -->
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-persistence-infinispan</artifactId>
        </dependency>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-persistence-postgresql</artifactId>
        </dependency>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-persistence-mongodb</artifactId>
        </dependency>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-persistence-jdbc</artifactId>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <configuration>
              <pomExcludes></pomExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <configuration>
            <streamLogs>true</streamLogs>
            <postBuildHookScript>verify</postBuildHookScript> <!-- no extension required -->
            <pomExcludes>integration-tests-springboot-persistence-it/**/pom.xml</pomExcludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-invoker-plugin</artifactId>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
