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

    <groupId>io.camunda</groupId>
    <artifactId>identity-management-parent</artifactId>
  <name>Camunda Identity Parent</name><!-- avoiding name clash with identity-parent in camunda/camunda -->
    <version>8.9.0-alpha4</version>
    <packaging>pom</packaging>
    <description>${project.name}</description>
    <url>https://camunda.com/</url>
    <scm>
        <connection>scm:git:git://github.com/camunda/identity.git</connection>
        <developerConnection>scm:git:ssh://github.com:camunda/identity.git</developerConnection>
        <url>http://github.com/camunda/identity/tree/main</url>
    </scm>
    <licenses>
        <license>
            <name>Camunda proprietary license</name>
            <url>https://github.com/camunda/identity/blob/main/license/License.txt</url>
        </license>
    </licenses>

    <modules>
        <module>management-api</module>
        <module>sdk-java</module>
        <module>spring-boot-starter</module>
        <module>spring-boot-autoconfigure</module>
    </modules>

    <properties>
        <revision>8.9.0-SNAPSHOT</revision>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.deploy.skip>false</maven.deploy.skip>
        <apache.commons-lang3.version>3.20.0</apache.commons-lang3.version>
        <assertj.assertj-core.version>3.27.6</assertj.assertj-core.version>
        <checkstyle.maven.plugin.version>3.6.0</checkstyle.maven.plugin.version>
        <checkstyle.version>10.26.1</checkstyle.version>
        <mojo.build-helper-plugin.version>3.6.1</mojo.build-helper-plugin.version>
        <maven.test-plugins.version>3.5.4</maven.test-plugins.version>
        <maven.compiler-plugin.version>3.14.1</maven.compiler-plugin.version>
        <maven.pgp-plugin.version>3.2.8</maven.pgp-plugin.version>
        <jackson.version>2.20.1</jackson.version>
        <junit.jupiter.version>5.11.3</junit.jupiter.version>
        <junit.platform.version>1.11.3</junit.platform.version>
        <snakeyaml.version>2.5</snakeyaml.version>
        <test.skip.regex>no-tests-skipped</test.skip.regex>
        <license-plugin.version>5.0.0</license-plugin.version>
        <license.header>./license/header.txt</license.header>
        <spring-boot.version>3.4.11</spring-boot.version>
        <spring-core.version>6.2.14</spring-core.version>
        <nexus.repository.url>https://artifacts.camunda.com/artifactory/camunda-identity/</nexus.repository.url>
        <nexus.repository.id>nexus</nexus.repository.id>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring-core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj.assertj-core.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <distributionManagement>
        <snapshotRepository>
            <id>nexus-snapshots</id>
            <url>https://artifacts.camunda.com/artifactory/camunda-identity-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>${nexus.repository.id}</id>
            <url>${nexus.repository.url}</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.maven.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>com.puppycrawl.tools</groupId>
                        <artifactId>checkstyle</artifactId>
                        <version>${checkstyle.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <violationSeverity>warning</violationSeverity>
                    <maxAllowedViolations>0</maxAllowedViolations>
                    <configLocation>checkstyle.xml</configLocation>
                    <suppressionsLocation>checkstyle-suppressions.xml</suppressionsLocation>
                    <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                    <consoleOutput>true</consoleOutput>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${mojo.build-helper-plugin.version}</version>
                <executions>
                    <execution>
                        <id>regex-property</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>maven.test.skip</name>
                            <value>${project.artifactId}</value>
                            <regex>${test.skip.regex}</regex>
                            <replacement>true</replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>flatten-maven-plugin</artifactId>
                <version>1.7.3</version>
                <configuration>
                    <updatePomFile>true</updatePomFile>
                    <flattenMode>resolveCiFriendliesOnly</flattenMode>
                </configuration>
                <executions>
                    <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>flatten</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license-plugin.version}</version>
                <configuration>
                    <header>${license.header}</header>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>central</id>
            <properties>
                <nexus.repository.url>https://repo1.maven.org/maven2</nexus.repository.url>
                <nexus.repository.id>central</nexus.repository.id>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>${maven.pgp-plugin.version}</version>
                            <executions>
                                <execution>
                                    <id>sign-artifacts</id>
                                    <phase>verify</phase>
                                    <goals>
                                        <goal>sign</goal>
                                    </goals>
                                </execution>
                            </executions>
                            <configuration>
                                <gpgArguments>
                                    <arg>--pinentry-mode</arg>
                                    <arg>loopback</arg>
                                </gpgArguments>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>

  <developers>
    <developer>
      <name>Camunda</name>
      <organization>Camunda</organization>
      <organizationUrl>https://github.com/camunda</organizationUrl>
    </developer>
  </developers>
</project>
