<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.camunda.community</groupId>
    <artifactId>community-hub-release-parent</artifactId>
    <version>1.4.4</version>
  </parent>
  <groupId>io.camunda</groupId>
  <artifactId>tasklist-client-root</artifactId>
  <version>8.6.6</version>
  <packaging>pom</packaging>

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

    <zeebe.version>8.5.7</zeebe.version>

    <spring-boot.version>3.3.5</spring-boot.version>
    <commons-beanutils.version>1.9.4</commons-beanutils.version>
    <resilience4j.version>2.2.0</resilience4j.version>
    <jackson.version>2.17.2</jackson.version>
    <commons-lang.version>3.15.0</commons-lang.version>

    <plugin.version.maven-enforcer-plugin>3.5.0</plugin.version.maven-enforcer-plugin>
    <plugin.version.function-maven-plugin>0.11.0</plugin.version.function-maven-plugin>
    <plugin.version.maven-install-plugin>3.1.3</plugin.version.maven-install-plugin>
    <plugin.version.maven-resources-plugin>3.3.1</plugin.version.maven-resources-plugin>
    <plugin.version.maven-shade-plugin>3.6.0</plugin.version.maven-shade-plugin>
    <plugin.version.maven-surefire-plugin>3.5.1</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.3</plugin.version.native-maven-plugin>
    <plugin.version.maven-depdendency-plugin>3.8.1</plugin.version.maven-depdendency-plugin>
    <plugin.version.maven-site-plugin>3.20.0</plugin.version.maven-site-plugin>
    <plugin.version.maven-assembly-plugin>3.7.1</plugin.version.maven-assembly-plugin>
    <plugin.version.maven-release-plugin>3.1.1</plugin.version.maven-release-plugin>
    <plugin.version.frontend-maven-plugin>1.15.1</plugin.version.frontend-maven-plugin>
    <plugin.version.maven-source-plugin>3.3.1</plugin.version.maven-source-plugin>
  </properties>

  <modules>
    <module>extension</module>
    <module>example</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>io.camunda</groupId>
        <artifactId>zeebe-bom</artifactId>
        <version>8.6.4</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <dependency>
        <groupId>io.camunda</groupId>
        <artifactId>camunda-tasklist-client-java</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>io.camunda.spring</groupId>
        <artifactId>spring-boot-starter-camunda-tasklist</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>3.0.2</version>
      </dependency>
      <dependency>
        <groupId>org.openapitools</groupId>
        <artifactId>jackson-databind-nullable</artifactId>
        <version>0.2.6</version>
      </dependency>
      <dependency>
        <groupId>io.camunda</groupId>
        <artifactId>camunda-tasklist-client-generated</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-bom</artifactId>
        <version>3.25.5</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>33.3.1-jre</version>
      </dependency>
      <dependency>
        <groupId>com.google.errorprone</groupId>
        <artifactId>error_prone_annotations</artifactId>
        <version>2.32.0</version>
      </dependency>
      <dependency>
        <groupId>org.wiremock</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>3.9.2</version>
      </dependency>
      <dependency>
        <groupId>com.auth0</groupId>
        <artifactId>java-jwt</artifactId>
        <version>4.4.0</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.openapitools</groupId>
          <artifactId>openapi-generator-maven-plugin</artifactId>
          <version>7.8.0</version>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>1.7.0</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>
          <executions>
            <execution>
              <id>analyze</id>
              <goals>
                <goal>analyze-only</goal>
              </goals>
              <configuration>
                <failOnWarning>true</failOnWarning>
              </configuration>
            </execution>
          </executions>
        </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>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${version.spring-boot}</version>
        </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-dependency-plugin</artifactId>
      </plugin>
      <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>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

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

  <licenses>
    <license>
      <name>Apache License</name>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/camunda-community-hub/camunda-tasklist-client-java</url>
    <connection>scm:git:git@github.com:camunda-community-hub/camunda-tasklist-client-java.git</connection>
    <developerConnection>scm:git:git@github.com:camunda-community-hub/camunda-tasklist-client-java.git</developerConnection>
    <tag>HEAD</tag>
  </scm>
</project>
