<?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>org.kie.kogito.examples</groupId>
    <artifactId>kogito-examples</artifactId>
    <version>1.8.0.Final</version>
  </parent>

  <artifactId>process-usertasks-custom-lifecycle-springboot</artifactId>
  <name>Kogito Example :: Process Usertasks With Custom Lifecycle Spring Boot</name>
  <description>Kogito usertasks orchestration with custom life cycle - Spring Boot</description>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${version.org.springframework.boot}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-bom</artifactId>
        <version>${kogito.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.infinispan</groupId>
        <artifactId>infinispan-bom</artifactId>
        <version>${version.org.infinispan}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

    <!-- kogito -->
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-springboot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>process-workitems</artifactId>
    </dependency>

    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-task-management</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>notification</id>
      <dependencies>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-springboot-mail</artifactId>
        </dependency>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-springboot-task-notification</artifactId>
        </dependency>
        <dependency>
          <groupId>org.springframework.kafka</groupId>
          <artifactId>spring-kafka</artifactId>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>persistence</id>
      <dependencies>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-persistence-infinispan</artifactId>
        </dependency>
        <dependency>
          <groupId>org.infinispan</groupId>
          <artifactId>infinispan-spring-boot-starter-remote</artifactId>
        </dependency>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-springboot-jobs-management</artifactId>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <build>
    <finalName>${project.artifactId}</finalName>
    <plugins>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${version.org.springframework.boot}</version>
        <executions>
          <execution>
            <goals>
              <goal>repackage</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.kie.kogito</groupId>
        <artifactId>kogito-maven-plugin</artifactId>
        <version>${kogito.version}</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>

</project>
