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

  <!-- Attention: to properly separate dependencies of extension and examples, do not define any dependencies/management here! -->

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

  <groupId>org.camunda.community.batch</groupId>
  <artifactId>camunda-platform-7-custom-batch-root</artifactId>
  <version>1.6.0</version>
  <packaging>pom</packaging>

  <modules>
    <module>extension</module>
    <module>examples</module>
  </modules>

  <properties>
    <java.version>1.8</java.version>

    <encoding>UTF-8</encoding>
    <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
    <project.build.resourceEncoding>${encoding}</project.build.resourceEncoding>

    <extension.groupId>org.camunda.community.batch</extension.groupId>
    <example.groupId>org.camunda.community.batch.example</example.groupId>

    <camunda.version>7.17.0</camunda.version>
    <slf4j.version>1.7.24</slf4j.version>
    <commons-lang3.version>3.12.0</commons-lang3.version>

    <gson.version>2.8.9</gson.version>

    <camunda-spring-boot.version>${camunda.version}</camunda-spring-boot.version>
    <spring-boot.version>2.6.3</spring-boot.version>

    <!-- is needed for camunda, upgrade could be done after camunda 7.17 is released -->
    <!-- https://forum.camunda.org/t/camunda-not-compatible-with-h2-2-0-202/32250/5 -->
    <h2.version>1.4.187</h2.version>

    <surefire.runOrder>reversealphabetical</surefire.runOrder>
  </properties>

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

      <dependency>
        <artifactId>camunda-platform-7-custom-batch-core</artifactId>
        <groupId>${extension.groupId}</groupId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <defaultGoal>clean install</defaultGoal>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:camunda/camunda-platform-7-custom-batch.git</connection>
    <url>scm:git:git@github.com:camunda/camunda-platform-7-custom-batch.git</url>
    <developerConnection>scm:git:git@github.com:camunda/camunda-platform-7-custom-batch.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <profiles>
    <profile>
      <id>community-action-maven-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
                <execution>
                    <id>sign-artifacts</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>sign</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <!-- Prevent gpg from using pinentry programs -->
                <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                </gpgArguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
