<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.operaton.bpm</groupId>
  <artifactId>operaton-root</artifactId>
  <version>1.0.0-beta-2</version>
  <packaging>pom</packaging>
  <name>Operaton - Root POM</name>
  <inceptionYear>2024</inceptionYear>

  <description>
    This pom defines the modules that make up the build.
    The parent pom for all Operaton projects can be found in the parent directory relative to this file.
  </description>

  <properties>
    <license.includeTransitiveDependencies>false</license.includeTransitiveDependencies>

    <!-- These properties are used in both the BOM as well as operaton-parent and subprojects -->
    <version.mybatis>3.5.15</version.mybatis>
    <version.joda-time>2.12.5</version.joda-time>
    <version.uuid-generator>4.3.0</version.uuid-generator>
    <version.feel-scala>1.18.1</version.feel-scala>
    <version.quarkus>3.15.0</version.quarkus>
    <version.java>17</version.java>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <sonar.organization>operaton</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>
    <sonar.coverage.jacoco.xmlReportPaths>**/target/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
    <!-- Set to false for each module that must be deployed -->
    <deploy.skip>true</deploy.skip>
  </properties>

  <build>
    <defaultGoal>verify</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.5.0</version>
        <executions>
          <execution>
            <id>enforce-default</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[17,)</version>
                  <message>
                    *************************************************************************************
                    *                                                                                   *
                    *                You must use at least JDK 17 to compile Operaton !!!               *
                    *                                                                                   *
                    *************************************************************************************
                  </message>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>3.9.0</version>
                </requireMavenVersion>
                <requireMatchingCoordinates>
                  <groupIdPattern>org\.operaton(?:..*)</groupIdPattern>
                </requireMatchingCoordinates>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <acceptPomPackaging>true</acceptPomPackaging>
          <excludedScopes>test</excludedScopes>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.github.eirslett</groupId>
          <artifactId>frontend-maven-plugin</artifactId>
          <version>1.15.1</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>4.6</version>
        </plugin>
        <plugin>
          <groupId>com.googlecode.maven-download-plugin</groupId>
          <artifactId>download-maven-plugin</artifactId>
          <version>1.11.1</version>
        </plugin>
        <plugin>
          <groupId>io.github.orhankupusoglu</groupId>
          <artifactId>sloc-maven-plugin</artifactId>
          <version>1.0.7</version>
        </plugin>
        <plugin>
          <groupId>io.quarkus</groupId>
          <artifactId>quarkus-extension-maven-plugin</artifactId>
          <version>${version.quarkus}</version>
        </plugin>
        <plugin>
          <groupId>net.kennychua</groupId>
          <artifactId>maven-urlpoller-plugin</artifactId>
          <version>1.0.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>5.1.2</version>
          <extensions>true</extensions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.7.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.13.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.8.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.3</version>
          <configuration>
            <skip>${deploy.skip}</skip>
            <altDeploymentRepository>local::file:${maven.multiModuleProjectDirectory}/target/staging-deploy</altDeploymentRepository>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-ear-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-ejb-plugin</artifactId>
          <version>3.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>3.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.4.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.10.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-rar-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.21.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>3.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>3.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.cargo</groupId>
          <artifactId>cargo-maven3-plugin</artifactId>
          <version>1.10.15</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>clirr-maven-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>3.5.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sql-maven-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.18.0</version>
        </plugin>
        <plugin>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>8.1.16.v20140903</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>11.0.24</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.transformer</groupId>
          <artifactId>transformer-maven-plugin</artifactId>
          <version>1.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.12</version>
        </plugin>
        <plugin>
          <groupId>org.jboss.shrinkwrap.resolver</groupId>
          <artifactId>shrinkwrap-resolver-maven-plugin</artifactId>
          <version>${version.shrinkwrap.resolvers}</version>
        </plugin>
        <plugin>
          <groupId>org.liquibase</groupId>
          <artifactId>liquibase-maven-plugin</artifactId>
          <version>4.29.2</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>3.3.5</version>
        </plugin>
      </plugins>
    </pluginManagement>

  </build>

  <profiles>
    <!-- distro profile is default and builds the complete distribution.
         Does not run integration tests. -->
    <profile>
      <id>distro</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <!-- This profile is run in the CI as the first step (platform-ASSEMBLY); It must not activate
          any modules that have a dependency to the webapps. See also the referenced POMs,
          they usually define which modules are covered by the distro profile -->
        <module>spring-boot-starter</module>

        <module>quarkus-extension</module>

        <module>qa</module>

        <module>javaee/ejb-service</module>
        <module>javaee/ejb-client</module>
        <module>javaee/ejb-client-jakarta</module>
        <module>javaee/jobexecutor-ra</module>
        <module>javaee/jobexecutor-rar</module>

        <module>model-api</module>
        <module>engine-dmn</module>
        <module>connect</module>
        <module>juel</module>
        <module>spin</module>
        <module>commons</module>
        <module>freemarker-template-engine</module>

        <module>test-utils/testcontainers</module>
        <module>test-utils/junit5-extension</module>
        <module>test-utils/junit5-extension-dmn</module>
        <module>test-utils/assert</module>
        <module>test-utils/archunit</module>

        <module>engine</module>
        <module>engine-cdi</module>
        <module>engine-spring</module>
        <module>engine-rest</module>

        <module>webapps</module>

        <module>examples</module>

        <module>engine-plugins</module>

        <module>distro/license-book</module>
        <module>distro/jboss</module>
        <module>distro/tomcat</module>
        <module>distro/sql-script</module>
        <!-- module>distro/run</module -->

        <module>clients/java</module>

        <module>internal-dependencies</module>
        <module>database</module>
        <module>parent</module>
        <module>bom</module>
      </modules>
    </profile>

    <profile>
      <id>distro-serverless</id>
      <modules>
        <module>qa</module>
        <module>model-api</module>
        <module>test-utils/archunit</module>
        <module>test-utils/testcontainers</module>
        <module>commons</module>
        <module>juel</module>
        <module>engine</module>
        <module>engine-cdi</module>
        <module>engine-dmn</module>
        <module>engine-spring</module>
        <module>engine-rest</module>
        <module>webapps</module>
        <module>examples</module>
        <module>engine-plugins</module>
        <module>distro/sql-script</module>
        <module>internal-dependencies</module>
        <module>database</module>
        <module>parent</module>
        <module>bom</module>
      </modules>
    </profile>

    <profile>
      <id>distro-tomcat</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>distro/license-book</module>
        <module>distro/tomcat</module>
      </modules>
    </profile>

    <profile>
      <id>distro-wildfly</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>javaee/ejb-client</module>
        <module>javaee/ejb-client-jakarta</module>
        <module>distro/license-book</module>
        <module>distro/wildfly</module>
        <!--<module>distro/wildfly26</module>-->
      </modules>
    </profile>

    <profile>
      <id>distro-webjar</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>distro/webjar</module>
      </modules>
    </profile>

    <profile>
      <id>distro-run</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <!-- module>distro/run</module -->
      </modules>
    </profile>

    <profile>
      <id>distro-starter</id>
      <!-- This profile is run in the release CI for building the enterprise artifacts
          It can be removed if the distro job is merged with the assembly job and
          distro-ce is not used for building the spring boot starter -->
      <modules>
        <module>spring-boot-starter</module>
      </modules>
    </profile>

    <profile>
      <!-- profile for running process-engine unit tests in QA -->
      <id>check-engine</id>
      <modules>
        <module>engine</module>
        <module>engine-cdi</module>
        <module>engine-spring</module>
        <module>engine-rest</module>

        <module>internal-dependencies</module>
        <module>database</module>
        <module>parent</module>
        <module>bom</module>
      </modules>
    </profile>

    <profile>
      <!-- profile for running webapp unit tests in QA -->
      <id>check-webapps</id>
      <modules>
        <module>internal-dependencies</module>
        <module>parent</module>
        <module>bom</module>
      </modules>
    </profile>

    <profile>
      <id>sonatype-oss-release</id>
      <properties>
        <deploy.skip>false</deploy.skip>
      </properties>
      <modules>
        <module>spring-boot-starter</module>
        <module>quarkus-extension</module>
        <module>model-api</module>
        <module>engine</module>
        <module>engine-cdi</module>
        <module>engine-spring</module>
        <module>engine-rest</module>
        <module>engine-dmn</module>
        <module>connect</module>
        <module>juel</module>
        <module>spin</module>
        <module>commons</module>
        <module>freemarker-template-engine</module>
        <module>javaee/ejb-client</module>
        <module>javaee/ejb-client-jakarta</module>
        <module>webapps</module>
        <module>engine-plugins</module>
        <module>distro/webjar</module>
        <module>clients/java</module>
        <module>test-utils/junit5-extension</module>
        <module>test-utils/junit5-extension-dmn</module>
        <module>test-utils/archunit</module>
        <module>test-utils/assert</module>
        <module>test-utils/testcontainers</module>
        <module>internal-dependencies</module>
        <module>database</module>
        <module>parent</module>
        <module>bom</module>
      </modules>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <failOnError>false</failOnError>
              <additionalJOptions>
                <additionalJOption>-Xdoclint:none</additionalJOption>
                <additionalJOption>--ignore-source-errors</additionalJOption>
              </additionalJOptions>
              <doctitle>Operaton Javadocs ${project.version}</doctitle>
              <windowtitle>Operaton Javadocs ${project.version}</windowtitle>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>license-header-check</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>openrewrite</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.openrewrite.maven</groupId>
            <artifactId>rewrite-maven-plugin</artifactId>
            <version>5.45.0</version>
            <configuration>
              <activeRecipes>
                org.openrewrite.java.RemoveUnusedImports,
                org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic
              </activeRecipes>
              <failOnDryRunResults>true</failOnDryRunResults>
              <exclusions>
                **/node/**
              </exclusions>
            </configuration>
            <dependencies>
              <dependency>
                <groupId>org.openrewrite.recipe</groupId>
                <artifactId>rewrite-static-analysis</artifactId>
                <version>1.20.0</version>
              </dependency>
              <dependency>
                <groupId>org.openrewrite.recipe</groupId>
                <artifactId>rewrite-testing-frameworks</artifactId>
                <version>2.22.0</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>maven-central</id>
      <name>Maven Central</name>
      <url>https://repo1.maven.org/maven2</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

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

  <organization>
    <name>Operaton</name>
    <url>http://www.operaton.com</url>
  </organization>

  <url>http://www.operaton.org</url>

  <developers>
    <developer>
      <id>operaton.org</id>
      <name>Operaton Community</name>
      <organization>operaton.org</organization>
      <organizationUrl>http://operaton.org</organizationUrl>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/operaton/operaton</url>
    <connection>scm:git:git@github.com:operaton/operaton.git</connection>
    <developerConnection>scm:git:git@github.com:operaton/operaton.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/operaton/operaton/issues/</url>
  </issueManagement>

</project>
