<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>io.serverlessworkflow</groupId>
  <artifactId>serverlessworkflow-parent</artifactId>
  <version>4.0.5.Final</version>
  <packaging>pom</packaging>

  <name>Serverless Workflow :: Parent</name>
  <url>https://serverlessworkflow.io/sdk-java/</url>
  <description>Java SDK for Serverless Workflow Specification</description>
  <inceptionYear>2020</inceptionYear>
  <developers>
    <developer>
      <id>serverless-workflow</id>
      <name>Serverless Workflow Specification Authors</name>
      <organization>CNCF</organization>
    </developer>
  </developers>
  <organization>
    <name>CNCF</name>
    <url>https://www.cncf.io//</url>
  </organization>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</connection>
    <developerConnection>scm:git:git@github.com:serverlessworkflow/sdk-java.git</developerConnection>
    <url>https://github.com/serverlessworkflow/sdk-java</url>
    <tag>4.0.5.Final</tag>
  </scm>

  <modules>
    <module>api</module>
    <module>spi</module>
    <module>validation</module>
    <module>diagram</module>
    <module>utils</module>
  </modules>

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

    <!-- Plugin versions, please keep in alphabetical order -->
    <version.buildnumber.plugin>3.2.0</version.buildnumber.plugin>
    <version.checkstyle.plugin>3.1.1</version.checkstyle.plugin>
    <version.compiler.plugin>3.8.1</version.compiler.plugin>
    <version.deploy.plugin>2.8.2</version.deploy.plugin>
    <version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
    <version.failsafe.plugin>3.1.2</version.failsafe.plugin>
    <version.fmt-maven-plugin>2.9.1</version.fmt-maven-plugin>
    <version.gpg.plugin>3.1.0</version.gpg.plugin>
    <version.jar.plugin>3.2.0</version.jar.plugin>
    <version.jdk>${java.version}</version.jdk>
    <version.jsonschema2pojo-maven-plugin>1.0.1</version.jsonschema2pojo-maven-plugin>
    <version.javadoc.plugin>3.6.0</version.javadoc.plugin>
    <version.release.plugin>3.0.1</version.release.plugin>
    <version.source.plugin>3.3.0</version.source.plugin>
    <version.surefire.plugin>2.22.0</version.surefire.plugin>


    <!-- Dependencies versions, please keep in alphabetical order -->
    <version.ch.qos.logback>1.4.9</version.ch.qos.logback>
    <version.com.fasterxml.jackson>2.15.3</version.com.fasterxml.jackson>
    <version.com.networknt>1.0.87</version.com.networknt>
    <version.commons.lang>3.13.0</version.commons.lang>
    <version.graphviz>0.17.0</version.graphviz>
    <version.hamcrest>1.3</version.hamcrest>
    <version.javax.validation>2.0.1.Final</version.javax.validation>
    <version.jsonassert>1.5.0</version.jsonassert>
    <version.org.assertj>3.13.2</version.org.assertj>
    <version.org.junit.jupiter>${version.org.junit}</version.org.junit.jupiter>
    <version.org.junit.minor>6.0</version.org.junit.minor>
    <version.org.junit>5.${version.org.junit.minor}</version.org.junit>
    <version.org.mockito>5.6.0</version.org.mockito>
    <version.org.slf4j>1.7.25</version.org.slf4j>
    <version.plantuml>8059</version.plantuml>
    <version.thymeleaf>3.1.2.RELEASE</version.thymeleaf>


    <!-- Checkstyle props -->
    <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
    <checkstyle.header.template><![CDATA[
^\/\*$\n^
\* Copyright \d\d\d\d-Present The Serverless Workflow Specification Authors$\n^
\*$\n^
\* Licensed under the Apache License, Version 2\.0 \(the &quot;License&quot;\);$\n^
\* you may not use this file except in compliance with the License\.$\n^
\* You may obtain a copy of the License at$\n^
\*$\n^
\* http:\/\/www\.apache\.org\/licenses\/LICENSE-2\.0$\n^
\*$\n^
\* Unless required by applicable law or agreed to in writing, software$\n^
\* distributed under the License is distributed on an &quot;AS IS&quot; BASIS,$\n^
\* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$\n^
\* See the License for the specific language governing permissions and$\n^
\* limitations under the License\.$\n^
\*\/$
]]>
    </checkstyle.header.template>
    <checkstyle.header.extensions>java</checkstyle.header.extensions>
    <checkstyle.logViolationsToConsole>true</checkstyle.logViolationsToConsole>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${version.com.fasterxml.jackson}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${version.com.fasterxml.jackson}</version>
      </dependency>
      <dependency>
        <groupId>com.networknt</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>${version.com.networknt}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-yaml</artifactId>
        <version>${version.com.fasterxml.jackson}</version>
      </dependency>
      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>${version.javax.validation}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${version.commons.lang}</version>
      </dependency>
      <dependency>
        <groupId>org.thymeleaf</groupId>
        <artifactId>thymeleaf</artifactId>
        <version>${version.thymeleaf}</version>
      </dependency>
      <dependency>
        <groupId>net.sourceforge.plantuml</groupId>
        <artifactId>plantuml</artifactId>
        <version>${version.plantuml}</version>
      </dependency>
      <dependency>
        <groupId>guru.nidi</groupId>
        <artifactId>graphviz-java</artifactId>
        <version>${version.graphviz}</version>
      </dependency>

      <!-- test -->
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${version.org.junit.jupiter}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${version.org.junit.jupiter}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${version.org.junit.jupiter}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${version.org.mockito}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${version.ch.qos.logback}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${version.org.assertj}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</artifactId>
        <version>${version.hamcrest}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.skyscreamer</groupId>
        <artifactId>jsonassert</artifactId>
        <version>${version.jsonassert}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <!-- Set properties containing the scm revision -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>${version.buildnumber.plugin}</version>
        <executions>
          <execution>
            <id>get-scm-revision</id>
            <phase>initialize</phase>
            <goals>
              <goal>create</goal>
            </goals>
            <configuration>
              <doCheck>false</doCheck>
              <doUpdate>false</doUpdate>
              <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
              <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.compiler.plugin}</version>
        <configuration>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <testSource>${maven.compiler.source}</testSource>
          <testTarget>${maven.compiler.target}</testTarget>
          <parameters>true</parameters>
          <compilerArgs>
            <arg>-Xlint:unchecked</arg>
          </compilerArgs>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${version.gpg.plugin}</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${version.deploy.plugin}</version>
          <configuration>
            <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${version.enforcer.plugin}</version>
          <executions>
            <execution>
              <id>enforce-versions</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireMavenVersion>
                    <version>${version.maven}</version>
                  </requireMavenVersion>
                  <requireJavaVersion>
                    <version>${version.jdk}</version>
                  </requireJavaVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${version.source.plugin}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <archive>
              <index>true</index>
              <manifest>
                <addDefaultSpecificationEntries>
                  true
                </addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>
                  true
                </addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-URL>${project.url}</Implementation-URL>
                <Java-Version>${java.version}</Java-Version>
                <Java-Vendor>${java.vendor}</Java-Vendor>
                <Os-Name>${os.name}</Os-Name>
                <Os-Arch>${os.arch}</Os-Arch>
                <Os-Version>${os.version}</Os-Version>
                <Scm-Url>${project.scm.url}</Scm-Url>
                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                <Scm-Revision>${buildNumber}</Scm-Revision>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${version.release.plugin}</version>
          <configuration>
            <preparationGoals>clean install</preparationGoals>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <pushChanges>false</pushChanges>
            <localCheckout>true</localCheckout>
            <remoteTagging>false</remoteTagging>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jsonschema2pojo</groupId>
          <artifactId>jsonschema2pojo-maven-plugin</artifactId>
          <version>${version.jsonschema2pojo-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${version.surefire.plugin}</version>
          <configuration>
            <argLine>-Xmx1024m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxPermSize=256m</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${version.failsafe.plugin}</version>
          <configuration>
            <argLine>-Xmx1024m -XX:+IgnoreUnrecognizedVMOptions -XX:MaxPermSize=256m</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.checkstyle.plugin}</version>
        </plugin>
        <plugin>
          <groupId>com.coveo</groupId>
          <artifactId>fmt-maven-plugin</artifactId>
          <version>${version.fmt-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${version.jar.plugin}</version>
          <configuration>
            <archive>
              <index>true</index>
              <manifest>
                <addDefaultSpecificationEntries>
                  true
                </addDefaultSpecificationEntries>
                <addDefaultImplementationEntries>
                  true
                </addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <Implementation-URL>${project.url}</Implementation-URL>
                <Java-Version>${java.version}</Java-Version>
                <Java-Vendor>${java.vendor}</Java-Vendor>
                <Os-Name>${os.name}</Os-Name>
                <Os-Arch>${os.arch}</Os-Arch>
                <Os-Version>${os.version}</Os-Version>
                <Scm-Url>${project.scm.url}</Scm-Url>
                <Scm-Connection>${project.scm.connection}</Scm-Connection>
                <Scm-Revision>${buildNumber}</Scm-Revision>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${version.javadoc.plugin}</version>
          <configuration>
            <failOnError>false</failOnError>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>


  <distributionManagement>
    <snapshotRepository>
      <id>ossrh-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <pluginRepositories>
    <pluginRepository>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>