<?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.holunda.c7._</groupId>
    <artifactId>c7-parent</artifactId>
    <version>2025.06.1</version>
    <relativePath>../../_build/parent/pom.xml</relativePath>
  </parent>

  <groupId>io.holunda.testing</groupId>
  <artifactId>camunda-bpm-jgiven-parent</artifactId>
  <version>2025.06.1</version>
  <packaging>pom</packaging>

  <name>${project.artifactId}</name>
  <description>Camunda BPM JGiven</description>
  <url>https://github.com/holunda-io/camunda-bpm-jgiven/</url>


  <properties>
    <jgiven.version>2.0.2</jgiven.version>
    <assertj.version>3.27.3</assertj.version>
    <jgiven-kotlin.version>2.0.2.1</jgiven-kotlin.version>

    <jgiven.report.dir>target/jgiven-reports</jgiven.report.dir>
  </properties>

  <modules>
    <module>extension</module>
    <!-- Example module is included via profile, see below -->
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-bom</artifactId>
        <version>${kotlin.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>com.tngtech.jgiven</groupId>
        <artifactId>jgiven-junit</artifactId>
        <version>${jgiven.version}</version>
      </dependency>
      <dependency>
        <groupId>com.tngtech.jgiven</groupId>
        <artifactId>jgiven-junit5</artifactId>
        <version>${jgiven.version}</version>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
      </dependency>
      <dependency>
        <groupId>io.toolisticon.testing</groupId>
        <artifactId>jgiven-kotlin</artifactId>
        <version>${jgiven-kotlin.version}</version>
      </dependency>
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-engine</artifactId>
        <version>${camunda.version}</version>
      </dependency>
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bpm-assert</artifactId>
        <version>${camunda.version}</version>
      </dependency>
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bpm-junit5</artifactId>
        <version>${camunda.version}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-reflect</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-stdlib-jdk8</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jetbrains.kotlin</groupId>
      <artifactId>kotlin-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/main/kotlin</sourceDirectory>
    <testSourceDirectory>src/test/kotlin</testSourceDirectory>

    <pluginManagement>
      <plugins>

        <plugin>
          <!-- java compiler -->
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.14.0</version>
          <configuration>
            <encoding>UTF-8</encoding>
            <source>${java.version}</source>
            <target>${java.version}</target>
          </configuration>
          <executions>
            <execution>
              <id>default-compile</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>default-testCompile</id>
              <phase>none</phase>
            </execution>
            <execution>
              <id>java-compile</id>
              <phase>compile</phase>
              <goals>
                <goal>compile</goal>
              </goals>
            </execution>
            <execution>
              <id>java-test-compile</id>
              <phase>test-compile</phase>
              <goals>
                <goal>testCompile</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <!-- kotlin compiler -->
          <artifactId>kotlin-maven-plugin</artifactId>
          <groupId>org.jetbrains.kotlin</groupId>
          <configuration>
            <compilerPlugins>
              <plugin>spring</plugin>
              <plugin>jpa</plugin>
              <plugin>no-arg</plugin>
              <plugin>all-open</plugin>
            </compilerPlugins>
            <pluginOptions>
              <!-- Each annotation is placed on its own line -->
              <option>all-open:annotation=io.holunda.camunda.bpm.extension.jgiven.JGivenProcessStage</option>
            </pluginOptions>
          </configuration>
          <executions>
            <execution>
              <id>compile</id>
              <goals>
                <goal>compile</goal>
              </goals>
              <configuration>
                <sourceDirs>
                  <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                </sourceDirs>
              </configuration>
            </execution>
            <execution>
              <id>test-compile</id>
              <goals>
                <goal>test-compile</goal>
              </goals>
              <configuration>
                <sourceDirs>
                  <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                </sourceDirs>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.jetbrains.kotlin</groupId>
              <artifactId>kotlin-maven-allopen</artifactId>
              <version>${kotlin.version}</version>
            </dependency>
            <dependency>
              <groupId>org.jetbrains.kotlin</groupId>
              <artifactId>kotlin-maven-noarg</artifactId>
              <version>${kotlin.version}</version>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <!-- JGiven Reports -->
          <groupId>com.tngtech.jgiven</groupId>
          <artifactId>jgiven-maven-plugin</artifactId>
          <version>${jgiven.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <format>html</format>
          </configuration>
        </plugin>

        <plugin>
          <!-- source from kotlin -->
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.6.1</version>
          <executions>
            <execution>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>${project.basedir}/src/main/kotlin</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>

    <profile>
      <id>examples</id>
      <activation>
        <property>
          <name>!skipExamples</name>
        </property>
      </activation>
      <modules>
        <module>examples</module>
      </modules>
    </profile>
  </profiles>

</project>
