<?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.camunda</groupId>
    <artifactId>zeebe-parent</artifactId>
    <version>8.6.0</version>
    <relativePath>parent/pom.xml</relativePath>
  </parent>

  <artifactId>camunda-8-root</artifactId>
  <packaging>pom</packaging>

  <name>Camunda 8 Root</name>

  <modules>
    <module>bom</module>
    <module>parent</module>
    <module>dist</module>
    <module>build-tools</module>
    <module>zeebe</module>
    <module>operate</module>
    <module>tasklist</module>
    <module>identity</module>
    <module>webapps-common</module>
    <module>webapps-schema</module>
    <module>authentication</module>
    <module>search</module>
    <module>service</module>
    <module>clients/java</module>
    <module>clients/spring-boot-starter-camunda-sdk</module>
    <module>testing/camunda-process-test-java</module>
    <module>testing/camunda-process-test-spring</module>
    <module>testing/camunda-process-test-example</module>
    <module>document</module>
  </modules>

  <scm>
    <connection>scm:git:https://${env.GITHUB_TOKEN_USR}:${env.GITHUB_TOKEN_PSW}@github.com/camunda/camunda.git</connection>
    <developerConnection>scm:git:https://${env.GITHUB_TOKEN_USR}:${env.GITHUB_TOKEN_PSW}@github.com/camunda/camunda.git</developerConnection>
    <tag>8.6.0</tag>
    <url>https://github.com/camunda/camunda</url>
  </scm>

  <build>
    <plugins>
      <!-- While other files are generally placed in a special directory, markdown files are not.
      To make sure all markdown files are formatted, we need to rely on the **/*.md pattern.
      This pattern will match all *.md files in all subdirectories (also in all submodules).
      So, we need to define it in the root-pom only to avoid formatting the files more than once.-->
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <configuration>
          <markdown>
            <includes>
              <include>**/*.md</include>
            </includes>
            <excludes>
              <exclude>**/target/**/*.md</exclude>
              <exclude>**/node_modules/**/*.md</exclude>
              <exclude>tasklist/client/**/*.md</exclude>
              <exclude>optimize/client/**/*.md</exclude>
            </excludes>
            <flexmark />
          </markdown>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!--
      The QA module is enabled by default, but having it in a profile allows us to exclude it easily.
      That is useful for example for creating releases. This profile is active if the skipQaBuild
      property is not present, or is present and set to a value other than 'true'.
      -->
    <profile>
      <id>integration-tests-build</id>
      <activation>
        <property>
          <name>skipQaBuild</name>
          <value>!true</value>
        </property>
      </activation>
      <modules>
        <module>qa</module>
      </modules>
    </profile>

    <profile>
      <id>include-optimize</id>
      <activation>
        <property>
          <name>skipOptimize</name>
          <value>!true</value>
        </property>
      </activation>
      <modules>
        <module>optimize</module>
      </modules>
    </profile>
  </profiles>
</project>
