<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.kie.kogito.examples</groupId>
    <artifactId>kogito-springboot-examples</artifactId>
    <version>2.44.1-SNAPSHOT</version>
  </parent>

  <artifactId>process-postgresql-persistence-springboot</artifactId>
  <name>Kogito Example :: Process PostgreSQL Persistence Spring Boot</name>
  <description>Kogito with PostgreSQL persistence - Spring Boot</description>

  <properties>
    <version.org.kie.kogito>2.44.1-SNAPSHOT</version.org.kie.kogito>
    <kogito.bom.version>2.44.1-SNAPSHOT</kogito.bom.version>
  </properties>

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

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

    <!-- kogito -->
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-processes-spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-addons-springboot-persistence-jdbc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>

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

    <dependency>
      <groupId>io.rest-assured</groupId>
      <artifactId>rest-assured</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kie.kogito</groupId>
      <artifactId>kogito-spring-boot-test-utils</artifactId>
      <version>${version.org.kie.kogito}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <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>${version.org.kie.kogito}</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>events</id>
      <activation>
        <property>
          <name>events</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.kie.kogito</groupId>
          <artifactId>kogito-addons-springboot-events-process-kafka</artifactId>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
