<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>

  <groupId>org.camunda.community.migration</groupId>
  <artifactId>camunda-7-to-8-migration</artifactId>
  <version>0.9.0</version>
  <packaging>pom</packaging>

  <parent>
    <groupId>org.camunda.community</groupId>
    <artifactId>community-hub-release-parent</artifactId>
    <version>1.4.4</version>
  </parent>

  <properties>
    <encoding>UTF-8</encoding>
    <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
    <project.build.resourceEncoding>${encoding}</project.build.resourceEncoding>
    <version.java>17</version.java>
    <maven.compiler.source>${version.java}</maven.compiler.source>
    <maven.compiler.target>${version.java}</maven.compiler.target>

    <version.zeebe>8.5.0</version.zeebe>
    <version.spring-boot-starter-camunda>8.4.2</version.spring-boot-starter-camunda>
    <version.zeebe-process-test-extension-testcontainer>8.5.0</version.zeebe-process-test-extension-testcontainer>
    <version.camunda.platform>7.21.0</version.camunda.platform>
    <version.jsoup>1.17.2</version.jsoup>
    <version.spring-boot>3.2.5</version.spring-boot>
    <version.picocli>4.7.5</version.picocli>
    <version.commons-io>2.16.1</version.commons-io>
    <version.slack-api-client>1.39.0</version.slack-api-client>
    <version.opencsv>5.9</version.opencsv>
    <version.operate-client>8.3.0.1</version.operate-client>
    <version.camunda-bpm-assert>15.0.0</version.camunda-bpm-assert>
    <version.jaxb-api>2.3.1</version.jaxb-api>
    <version.grpc>1.63.0</version.grpc>
    <version.protobuf>3.25.3</version.protobuf>
    <version.guava>33.1.0-jre</version.guava>
    <version.error_prone_annotations>2.26.1</version.error_prone_annotations>
    <version.java-jwt>4.4.0</version.java-jwt>
    <version.okio>3.9.0</version.okio>
    <version.archunit>1.3.0</version.archunit>

    <plugin.version.function-maven-plugin>0.11.0</plugin.version.function-maven-plugin>
    <plugin.version.maven-enforcer-plugin>3.4.1</plugin.version.maven-enforcer-plugin>
    <plugin.version.maven-install-plugin>3.1.1</plugin.version.maven-install-plugin>
    <plugin.version.maven-resources-plugin>3.3.1</plugin.version.maven-resources-plugin>
    <plugin.version.maven-shade-plugin>3.5.2</plugin.version.maven-shade-plugin>
    <plugin.version.maven-surefire-plugin>3.2.5</plugin.version.maven-surefire-plugin>
    <plugin.version.spotless-maven-plugin>2.43.0</plugin.version.spotless-maven-plugin>
    <plugin.version.maven-compiler-plugin>3.13.0</plugin.version.maven-compiler-plugin>
    <plugin.version.native-maven-plugin>0.10.1</plugin.version.native-maven-plugin>
    <plugin.version.maven-depdendency-plugin>3.6.1</plugin.version.maven-depdendency-plugin>
    <plugin.version.maven-site-plugin>3.12.1</plugin.version.maven-site-plugin>
    <plugin.version.maven-assembly-plugin>3.7.1</plugin.version.maven-assembly-plugin>
    <plugin.version.maven-release-plugin>3.0.1</plugin.version.maven-release-plugin>
    <plugin.version.frontend-maven-plugin>1.15.0</plugin.version.frontend-maven-plugin>
    <plugin.version.maven-source-plugin>3.3.1</plugin.version.maven-source-plugin>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bom</artifactId>
        <version>${version.camunda.platform}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>io.camunda</groupId>
        <artifactId>zeebe-bom</artifactId>
        <version>${version.zeebe}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${version.spring-boot}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-bom</artifactId>
        <version>${version.grpc}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-bom</artifactId>
        <version>${version.protobuf}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava-bom</artifactId>
        <version>${version.guava}</version>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${version.guava}</version>
      </dependency>
      <dependency>
        <groupId>com.google.errorprone</groupId>
        <artifactId>error_prone_annotations</artifactId>
        <version>${version.error_prone_annotations}</version>
      </dependency>
      <dependency>
        <groupId>info.picocli</groupId>
        <artifactId>picocli</artifactId>
        <version>${version.picocli}</version>
      </dependency>
      <dependency>
        <groupId>info.picocli</groupId>
        <artifactId>picocli-codegen</artifactId>
        <version>${version.picocli}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${version.commons-io}</version>
      </dependency>
      <dependency>
        <groupId>io.camunda.spring</groupId>
        <artifactId>spring-boot-starter-camunda</artifactId>
        <version>${version.spring-boot-starter-camunda}</version>
      </dependency>
      <dependency>
        <groupId>io.camunda</groupId>
        <artifactId>camunda-operate-client-java</artifactId>
        <version>${version.operate-client}</version>
      </dependency>
      <dependency>
        <groupId>io.camunda.spring</groupId>
        <artifactId>spring-boot-starter-camunda-test-testcontainer</artifactId>
        <version>${version.spring-boot-starter-camunda}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.camunda</groupId>
        <artifactId>zeebe-process-test-extension-testcontainer</artifactId>
        <version>${version.zeebe-process-test-extension-testcontainer}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jsoup</groupId>
        <artifactId>jsoup</artifactId>
        <version>${version.jsoup}</version>
      </dependency>
      <dependency>
        <groupId>com.slack.api</groupId>
        <artifactId>slack-api-client</artifactId>
        <version>${version.slack-api-client}</version>
      </dependency>
      <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>${version.opencsv}</version>
      </dependency>
      <dependency>
        <groupId>org.camunda.bpm.assert</groupId>
        <artifactId>camunda-bpm-assert</artifactId>
        <version>${version.camunda-bpm-assert}</version>
      </dependency>
      <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>${version.jaxb-api}</version>
      </dependency>
      <dependency>
        <groupId>com.auth0</groupId>
        <artifactId>java-jwt</artifactId>
        <version>${version.java-jwt}</version>
      </dependency>
      <dependency>
        <groupId>com.squareup.okio</groupId>
        <artifactId>okio</artifactId>
        <version>${version.okio}</version>
      </dependency>
      <dependency>
        <groupId>com.tngtech.archunit</groupId>
        <artifactId>archunit-junit5</artifactId>
        <version>${version.archunit}</version>
      </dependency>
      <dependency>
        <groupId>org.camunda.community.migration</groupId>
        <artifactId>backend-diagram-converter-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.camunda.community.migration</groupId>
        <artifactId>camunda-7-adapter</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.6.13</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${plugin.version.maven-source-plugin}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${plugin.version.maven-assembly-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${plugin.version.maven-resources-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${plugin.version.maven-site-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${plugin.version.maven-depdendency-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.graalvm.buildtools</groupId>
          <artifactId>native-maven-plugin</artifactId>
          <version>${plugin.version.native-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${plugin.version.maven-compiler-plugin}</version>
          <configuration>
            <compilerArgs>
              <arg>-parameters</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${version.spring-boot}</version>
          <configuration>
            <image>
              <env>
                <BP_JVM_VERSION>17</BP_JVM_VERSION>
                <BPE_LANG>en_US.utf8</BPE_LANG>
              </env>
              <createdDate>${maven.build.timestamp}</createdDate>
            </image>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${plugin.version.maven-install-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${plugin.version.maven-shade-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${plugin.version.maven-surefire-plugin}</version>
          <configuration>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${plugin.version.maven-enforcer-plugin}</version>
          <configuration>
            <rules>
              <reactorModuleConvergence />
              <dependencyConvergence />
              <requirePluginVersions />
            </rules>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>enforce</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>${plugin.version.spotless-maven-plugin}</version>
          <configuration>
            <formats>
              <format>
                <includes>
                  <include>*.md</include>
                  <include>.gitignore</include>
                </includes>
                <trimTrailingWhitespace />
                <endWithNewline />
                <indent>
                  <spaces>true</spaces>
                  <spacesPerTab>2</spacesPerTab>
                </indent>
              </format>
            </formats>
            <java>
              <googleJavaFormat />
            </java>
            <pom />
          </configuration>
        </plugin>
        <plugin>
          <groupId>com.google.cloud.functions</groupId>
          <artifactId>function-maven-plugin</artifactId>
          <version>${plugin.version.function-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${plugin.version.maven-release-plugin}</version>
        </plugin>
        <plugin>
          <groupId>com.github.eirslett</groupId>
          <artifactId>frontend-maven-plugin</artifactId>
          <version>${plugin.version.frontend-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <versionRange>[1.0.0,)</versionRange>
                    <goals>
                      <goal>enforce</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>example</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>example</module>
      </modules>
    </profile>

    <!-- profile to auto format -->
    <profile>
      <id>autoFormat</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>spotless-format</id>
                <goals>
                  <goal>apply</goal>
                </goals>
                <phase>process-sources</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- profile to perform strict validation checks -->
    <profile>
      <id>checkFormat</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>spotless-check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <phase>validate</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <modules>
    <module>camunda-7-adapter</module>
    <module>backend-diagram-converter</module>
    <module>process-instance-migration</module>
    <module>test-example-diagrams</module>
    <module>code-migration-detector</module>
  </modules>

</project>
