<?xml version="1.0" encoding="UTF-8"?>
<!--
   Copyright The Narayana Authors
   SPDX short identifier: Apache-2.0
 -->
<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.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>39</version>
  </parent>

  <groupId>org.jboss.narayana.lra</groupId>
  <artifactId>lra-parent</artifactId>
  <version>1.0.1.Final</version>
  <packaging>pom</packaging>
  <name>LRA Parent</name>
  <description>LRA Parent</description>

  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <modules>
    <module>service-base</module>
    <module>client</module>
    <module>coordinator</module>
    <module>coordinator-war</module>
    <module>proxy</module>
    <module>test</module>
    <module>jaxrs</module>
  </modules>
  <distributionManagement>
    <repository>
      <id>jboss-releases-repository</id>
      <name>JBoss Release Repository</name>
      <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshot Repository</name>
      <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>

    <!-- END lra properties-->

    <buildproperty.date>${maven.build.timestamp}</buildproperty.date>
    <!-- Checkstyle is enabled by default -->
    <checkstyle.skip>false</checkstyle.skip>
    <format.skip>false</format.skip>
    <ipv6.server.jvm.args>-Djboss.bind.address=[::1] -Djboss.bind.address.management=[::1]
      -Djboss.bind.address.unsecure=[::1] -Djava.net.preferIPv4Stack=false -Djava.net.preferIPv6Addresses=true</ipv6.server.jvm.args>
    <jvm.args.byteman>-Dorg.jboss.byteman.verbose
                        -Djboss.modules.system.pkgs=org.jboss.byteman
                        -Dorg.jboss.byteman.transform.all
                        -javaagent:${project.build.directory}/lib/byteman.jar=listener:true</jvm.args.byteman>
    <jvm.args.debug></jvm.args.debug>

    <!-- IP stack configs. -->
    <jvm.args.ip>-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false</jvm.args.ip>
    <jvm.args.jacoco>-javaagent:${project.build.directory}/lib/jacocoagent.jar=destfile=${project.build.directory}/coverage-reports/jacoco-ut.exec,includes=*,append=true,output=file</jvm.args.jacoco>
    <!-- the need for -XX:MaxPermSize= was dropped as of Java SE 8 -->
    <!-- -XX:ParallelGCThreads=2 is no not available in Java SE 9 -->
    <jvm.args.memory>-Xms64m -Xmx1024m</jvm.args.memory>
    <jvm.args.modular></jvm.args.modular>
    <jvm.args.other>-server</jvm.args.other>
    <lra.coordinator.debug.params></lra.coordinator.debug.params>

    <!-- LRA properties-->
    <lra.test.timeout.factor>1.0</lra.test.timeout.factor>

    <maven.build.timestamp.format>yyyy/MMM/dd HH:mm</maven.build.timestamp.format>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>

    <narayana.version>7.2.2.Final</narayana.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <server.jvm.args>${jvm.args.other} ${jvm.args.memory} ${jvm.args.modular}</server.jvm.args>
    <skipITs>true</skipITs>
    <skipMavenDeployMojo>false</skipMavenDeployMojo>
    <skipNexusStagingDeployMojo>true</skipNexusStagingDeployMojo>
    <!-- Sortpom is enabled by default, but it could be disabled in sub-modules setting sortpom.skip = true -->
    <sortpom.skip>false</sortpom.skip>

    <test.logs.to.file>false</test.logs.to.file>
    <!-- The surefire/failsafe test execution logs goes to a file by default -->
    <testLogToFile>true</testLogToFile>
    <version.com.github.spotbugs.spotbugs-maven-plugin>4.8.3.1</version.com.github.spotbugs.spotbugs-maven-plugin>
    <version.com.h2database>2.2.224</version.com.h2database>
    <version.doxia>1.8.1</version.doxia>
    <version.formatter.plugin>2.26.0</version.formatter.plugin>

    <version.hamcrest>2.2</version.hamcrest>
    <version.httpcomponents>4.5.14</version.httpcomponents>
    <version.io.narayana.checkstyle-config>1.0.1.Final</version.io.narayana.checkstyle-config>
    <version.io.netty>4.1.118.Final</version.io.netty>

    <version.io.smallrye.smallrye-config>3.2.0</version.io.smallrye.smallrye-config>
    <version.io.undertow>2.3.18.Final</version.io.undertow>
    <version.jakarta.enterprise>4.0.0</version.jakarta.enterprise>
    <version.jakarta.inject.jakarta.inject-api>2.0.1</version.jakarta.inject.jakarta.inject-api>
    <version.jakarta.json-api>2.1.1</version.jakarta.json-api>
    <version.jakarta.servlet.jakarta-servlet-api>6.0.0</version.jakarta.servlet.jakarta-servlet-api>
    <version.jakarta.ws.rs.jakarta-ws-rs-api>3.1.0</version.jakarta.ws.rs.jakarta-ws-rs-api>
    <version.jboss-modules>1.10.2.Final</version.jboss-modules>
    <version.junit>4.13.1</version.junit>
    <version.maven.checkstyle-plugin>3.6.0</version.maven.checkstyle-plugin>
    <version.maven.jandex-plugin>3.1.7</version.maven.jandex-plugin>
    <version.microprofile.config-api>3.0.2</version.microprofile.config-api>
    <version.microprofile.fault-tolerance>4.0.2</version.microprofile.fault-tolerance>

    <!-- Needed for WildflyLRACoordinatorDeployment class -->
    <version.microprofile.lra>2.0.1</version.microprofile.lra>
    <version.org.apache.activemq>2.41.0</version.org.apache.activemq>
    <version.org.codehaus.mojo.jboss-maven-plugin>1.5.0</version.org.codehaus.mojo.jboss-maven-plugin>
    <version.org.eclipse.microprofile.openapi>3.1</version.org.eclipse.microprofile.openapi>

    <version.org.jacoco>0.8.8</version.org.jacoco>
    <version.org.jboss.arquillian.core>1.7.0.Final</version.org.jboss.arquillian.core>
    <version.org.jboss.as.plugins.jboss-as-maven-plugin>7.4.Final</version.org.jboss.as.plugins.jboss-as-maven-plugin>
    <!-- remark: this property is duplicated in the top level pom -->
    <version.org.jboss.byteman>4.0.22</version.org.jboss.byteman>
    <version.org.jboss.logging.jboss-logging>3.5.0.Final</version.org.jboss.logging.jboss-logging>
    <version.org.jboss.logging.jboss-logging-processor>2.2.1.Final</version.org.jboss.logging.jboss-logging-processor>
    <!-- Needed forWildflyLRACoordinatorDeployment class -->
    <version.org.jboss.resteasy>6.2.10.Final</version.org.jboss.resteasy>
    <version.org.jboss.shrinkwrap.resolvers>3.3.2</version.org.jboss.shrinkwrap.resolvers>
    <version.org.jboss.weld>5.0.1.Final</version.org.jboss.weld>
    <version.org.sonatype.plugins.nexus-staging-maven-plugin>1.7.0</version.org.sonatype.plugins.nexus-staging-maven-plugin>
    <version.org.wildfly.arquillian>5.0.0.Final</version.org.wildfly.arquillian>
    <version.parsson>1.1.3</version.parsson>
    <version.smallrye-converter-api>2.7.0</version.smallrye-converter-api>
    <version.sortpom>3.0.0</version.sortpom>
    <version.wildfly-maven-plugin>4.1.0.Final</version.wildfly-maven-plugin>

  </properties>

  <dependencyManagement>

    <dependencies>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-buffer</artifactId>
        <version>${version.io.netty}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-common</artifactId>
        <version>${version.io.netty}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>${version.org.jboss.logging.jboss-logging}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-processor</artifactId>
        <version>${version.org.jboss.logging.jboss-logging-processor}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.narayana.arjunacore</groupId>
        <artifactId>arjuna</artifactId>
        <version>${narayana.version}</version>
      </dependency>

      <dependency>
        <groupId>jakarta.inject</groupId>
        <artifactId>jakarta.inject-api</artifactId>
        <version>${version.jakarta.inject.jakarta.inject-api}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.enterprise</groupId>
        <artifactId>jakarta.enterprise.cdi-api</artifactId>
        <version>${version.jakarta.enterprise}</version>
      </dependency>

      <!-- Ensure these are in the distribution -->
      <dependency>
        <groupId>jakarta.json</groupId>
        <artifactId>jakarta.json-api</artifactId>
        <version>${version.jakarta.json-api}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.parsson</groupId>
        <artifactId>parsson</artifactId>
        <version>${version.parsson}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>${version.jakarta.servlet.jakarta-servlet-api}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.modules</groupId>
        <artifactId>jboss-modules</artifactId>
        <version>${version.jboss-modules}</version>
      </dependency>

      <!-- undertow with RestEasy -->
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>${version.org.jboss.resteasy}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-undertow</artifactId>
        <version>${version.org.jboss.resteasy}</version>
      </dependency>
      <dependency>
        <groupId>io.undertow</groupId>
        <artifactId>undertow-core</artifactId>
        <version>${version.io.undertow}</version>
      </dependency>
      <dependency>
        <groupId>io.undertow</groupId>
        <artifactId>undertow-servlet</artifactId>
        <version>${version.io.undertow}</version>
      </dependency>
      <!-- end undertow with RestEasy -->

      <dependency>
        <groupId>jakarta.ws.rs</groupId>
        <artifactId>jakarta.ws.rs-api</artifactId>
        <version>${version.jakarta.ws.rs.jakarta-ws-rs-api}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>lra-client</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>lra-service-base</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>lra-proxy-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>narayana-lra</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>lra-coordinator-jar</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>lra-coordinator-war</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.config</groupId>
        <artifactId>microprofile-config-api</artifactId>
        <version>${version.microprofile.config-api}</version>
      </dependency>
      <dependency>
        <groupId>io.smallrye.config</groupId>
        <artifactId>smallrye-config</artifactId>
        <version>${version.io.smallrye.smallrye-config}</version>
        <exclusions>
          <exclusion>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.fault-tolerance</groupId>
        <artifactId>microprofile-fault-tolerance-api</artifactId>
        <version>${version.microprofile.fault-tolerance}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.lra</groupId>
        <artifactId>microprofile-lra-api</artifactId>
        <version>${version.microprofile.lra}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.openapi</groupId>
        <artifactId>microprofile-openapi-api</artifactId>
        <version>${version.org.eclipse.microprofile.openapi}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.microprofile.lra</groupId>
        <artifactId>microprofile-lra-tck</artifactId>
        <version>${version.microprofile.lra}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson2-provider</artifactId>
        <version>${version.org.jboss.resteasy}</version>
      </dependency>

      <!-- test dependencies -->
      <dependency>
        <groupId>org.jboss.byteman</groupId>
        <artifactId>byteman-bmunit</artifactId>
        <version>${version.org.jboss.byteman}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${version.com.h2database}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian.protocol</groupId>
        <artifactId>arquillian-protocol-servlet-jakarta</artifactId>
        <version>${version.org.jboss.arquillian.core}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.byteman</groupId>
        <artifactId>byteman-install</artifactId>
        <version>${version.org.jboss.byteman}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jacoco</groupId>
        <artifactId>org.jacoco.agent</artifactId>
        <version>${version.org.jacoco}</version>
        <scope>test</scope>
      </dependency>

      <!-- Arquillian Maven Resolver -->
      <dependency>
        <groupId>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-api</artifactId>
        <version>${version.org.jboss.shrinkwrap.resolvers}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
        <version>${version.org.jboss.shrinkwrap.resolvers}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.arquillian.junit</groupId>
        <artifactId>arquillian-junit-container</artifactId>
        <version>${version.org.jboss.arquillian.core}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.shrinkwrap.resolver</groupId>
        <artifactId>shrinkwrap-resolver-impl-maven-archive</artifactId>
        <version>${version.org.jboss.shrinkwrap.resolvers}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.byteman</groupId>
        <artifactId>byteman</artifactId>
        <version>${version.org.jboss.byteman}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.byteman</groupId>
        <artifactId>byteman-submit</artifactId>
        <version>${version.org.jboss.byteman}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
        <scope>test</scope>
      </dependency>
      <!-- undertow with RestEasy -->
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest</artifactId>
        <version>${version.hamcrest}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.narayana.lra</groupId>
        <artifactId>lra-test-arquillian-extension</artifactId>
        <version>${project.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.weld.se</groupId>
        <artifactId>weld-se-shaded</artifactId>
        <version>${version.org.jboss.weld}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.wildfly.arquillian</groupId>
        <artifactId>wildfly-arquillian-container-managed</artifactId>
        <version>${version.org.wildfly.arquillian}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <repositories>
    <repository>
      <id>jboss-public-releases-repository-group</id>
      <name>JBoss Public Releases Maven Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/repositories/releases</url>
    </repository>
    <repository>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>repo.eclipse.org-snapshots</id>
      <name>Eclipse MicroProfile Repository - Snapshots</name>
      <url>https://repo.eclipse.org/content/repositories/microprofile-snapshots</url>
    </repository>
  </repositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <configuration>
            <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>jboss-maven-plugin</artifactId>
          <version>${version.org.codehaus.mojo.jboss-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.jboss.as.plugins</groupId>
          <artifactId>jboss-as-maven-plugin</artifactId>
          <version>${version.org.jboss.as.plugins.jboss-as-maven-plugin}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.2.0</version>
          <configuration>
            <archive>
              <manifestEntries>
                <Implementation-Title>${project.name}</Implementation-Title>
                <Implementation-URL>https://www.jboss.org/</Implementation-URL>
                <Implementation-Vendor>JBoss by Red Hat, Inc.</Implementation-Vendor>
                <Implementation-Vendor-Id>https://www.jboss.org/</Implementation-Vendor-Id>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.compiler.plugin}</version>
          <!-- Remove this when org.jboss.logging becomes Jakarta compatible -->
          <configuration>
            <compilerArgs>
              <arg>-Aorg.jboss.logging.tools.addGeneratedAnnotation=false</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <configuration>
            <skip>${skipMavenDeployMojo}</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${version.org.sonatype.plugins.nexus-staging-maven-plugin}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>jboss-releases-repository</serverId>
            <nexusUrl>https://repository.jboss.org/nexus/</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
            <skipNexusStagingDeployMojo>${skipNexusStagingDeployMojo}</skipNexusStagingDeployMojo>
          </configuration>
          <executions>
            <execution>
              <id>nexus-deploy</id>
              <goals>
                <goal>deploy</goal>
              </goals>
              <phase>deploy</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <includes>
              <!-- Unit tests running with no container involved -->
              <include>*Test.java</include>
            </includes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <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-dependency-plugin</artifactId>
                    <versionRange>[2.8,)</versionRange>
                    <goals>
                      <goal>copy-dependencies</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jboss.byteman</groupId>
                    <artifactId>byteman-rulecheck-maven-plugin</artifactId>
                    <versionRange>[2.1.3,)</versionRange>
                    <goals>
                      <goal>rulecheck</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <versionRange>[1.7,)</versionRange>
                    <goals>
                      <goal>add-source</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>idlj-maven-plugin</artifactId>
                    <versionRange>[1.2.1,)</versionRange>
                    <goals>
                      <goal>generate</goal>
                      <goal>generate-test</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore></ignore>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>io.smallrye</groupId>
          <artifactId>jandex-maven-plugin</artifactId>
          <version>${version.maven.jandex-plugin}</version>
          <executions>
            <execution>
              <id>make-index</id>
              <goals>
                <goal>jandex</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <inherited>false</inherited>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <redirectTestOutputToFile>${test.logs.to.file}</redirectTestOutputToFile>
          <skipITs>${skipITs}</skipITs>
          <systemPropertyVariables>
            <java.util.logging.config.file>${project.build.testOutputDirectory}/logging.properties</java.util.logging.config.file>
            <maven.test.classes.dir>${project.build.testOutputDirectory}</maven.test.classes.dir>
          </systemPropertyVariables>
          <includes>
            <!-- Integration tests running at the container -->
            <include>*IT.java</include>
            <include>*Tests.java</include>
            <!-- LRA TCK tests are named with 'Tests.java' -->
            <include>*TestCase.java</include>
          </includes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${version.maven.checkstyle-plugin}</version>
        <configuration>
          <configLocation>narayana-checkstyle/checkstyle.xml</configLocation>
          <suppressionsLocation>narayana-checkstyle/suppressions.xml</suppressionsLocation>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <excludes>**/*$logger.java,**/*$bundle.java</excludes>
          <useFile></useFile>
          <skip>${checkstyle.skip}</skip>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>io.narayana</groupId>
            <artifactId>narayana-checkstyle-config</artifactId>
            <version>${version.io.narayana.checkstyle-config}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>check-style</id>
            <goals>
              <goal>checkstyle</goal>
            </goals>
            <phase>compile</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration combine.self="append">
          <forkCount>1</forkCount>
          <reuseForks>false</reuseForks>
          <childDelegation>true</childDelegation>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <argLine>-Djdk.attach.allowAttachSelf=true ${jvm.args.modular}</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[17,)</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.revelc.code.formatter</groupId>
        <artifactId>formatter-maven-plugin</artifactId>
        <version>${version.formatter.plugin}</version>
        <configuration>
          <!-- store outside of target to speed up formatting when mvn clean is used -->
          <cachedir>.cache/formatter-maven-plugin-${version.formatter.plugin}</cachedir>
          <configFile>eclipse-format.xml</configFile>
          <lineEnding>LF</lineEnding>
          <skip>${format.skip}</skip>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-ide-config</artifactId>
            <version>3.22.2</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-install-plugin</artifactId>
              <executions>
                <execution>
                  <id>default-install</id>
                  <phase>none</phase>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-install-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>default-install</id>
                <phase>install</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>codeCoverage</id>
      <dependencies>
        <dependency>
          <groupId>org.jacoco</groupId>
          <artifactId>org.jacoco.agent</artifactId>
          <version>${version.org.jacoco}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${version.org.jacoco}</version>
            <executions>
              <!--
                     Prepares the property pointing to the JaCoCo runtime agent which
                     is passed as VM argument when Maven the Surefire plugin is executed.
                 -->
              <execution>
                <id>pre-unit-test</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <!-- Sets the path to the file which contains the execution data. -->
                  <destFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</destFile>
                  <!--
                             Sets the name of the property containing the settings
                             for JaCoCo runtime agent.
                         -->
                  <propertyName>surefireArgLine</propertyName>
                </configuration>
              </execution>
              <!--
                     Ensures that the code coverage report for unit tests is created after
                     unit tests have been run.
                 -->
              <execution>
                <id>post-unit-test</id>
                <goals>
                  <goal>report</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <!-- Sets the path to the file which contains the execution data. -->
                  <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
                  <!-- Sets the output directory for the code coverage report. -->
                  <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
                </configuration>
              </execution>
              <execution>
                <id>check</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <dataFile>${project.build.directory}/coverage-reports/jacoco-ut.exec</dataFile>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <excludes>
                        <exclude>*Test</exclude>
                      </excludes>
                      <limits>
                        <limit>
                          <counter>INSTRUCTION</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>0.0</minimum>
                        </limit>
                        <!--
                                  <limit>
                                    <counter>CLASS</counter>
                                    <value>MISSEDCOUNT</value>
                                    <maximum>0</maximum>
                                  </limit>
								  -->
                      </limits>
                    </rule>
                    <!--
                              <rule>
                                <element>CLASS</element>
                                <excludes>
                                  <exclude>*Test</exclude>
                                </excludes>
                                <limits>
                                  <limit>
                                    <counter>LINE</counter>
                                    <value>COVEREDRATIO</value>
                                    <minimum>0.20</minimum>
                                  </limit>
                                </limits>
                              </rule>
							  -->
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <argLine>${surefireArgLine} ${jvm.args.modular} -Djdk.attach.allowAttachSelf=true -Xss2048k</argLine>
              <systemProperties>
                <property>
                  <name>com.arjuna.ats.arjuna.common.propertiesFile</name>
                  <value>jbossts-properties.xml</value>
                </property>
              </systemProperties>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack-jacoco-agent</id>
                <goals>
                  <goal>unpack-dependencies</goal>
                </goals>
                <phase>test-compile</phase>
                <configuration>
                  <stripVersion>true</stripVersion>
                  <includeGroupIds>org.jacoco</includeGroupIds>
                  <outputDirectory>${project.build.directory}/lib</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>debug</id>
      <activation>
        <property>
          <name>debug</name>
        </property>
      </activation>
      <properties>
        <jvm.args.debug>-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y</jvm.args.debug>
      </properties>
    </profile>
    <profile>
      <id>findbugs</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <version>${version.com.github.spotbugs.spotbugs-maven-plugin}</version>
            <executions>
              <execution>
                <id>spotbugs</id>
                <goals>
                  <goal>check</goal>
                </goals>
                <phase>compile</phase>
                <configuration>
                  <failOnError>false</failOnError>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-decoration-model</artifactId>
                <version>${version.doxia}</version>
              </dependency>
              <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-skin-model</artifactId>
                <version>${version.doxia}</version>
              </dependency>
              <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-integration-tools</artifactId>
                <version>${version.doxia}</version>
              </dependency>
              <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-site-renderer</artifactId>
                <version>${version.doxia}</version>
              </dependency>
              <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-doc-renderer</artifactId>
                <version>${version.doxia}</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
      <reporting>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <version>${version.com.github.spotbugs.spotbugs-maven-plugin}</version>
          </plugin>
        </plugins>
      </reporting>
    </profile>
    <profile>
      <id>format</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>!no-format</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>net.revelc.code.formatter</groupId>
            <artifactId>formatter-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>format</goal>
                </goals>
                <phase>process-sources</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>net.revelc.code</groupId>
            <artifactId>impsort-maven-plugin</artifactId>
            <configuration>
              <removeUnused>true</removeUnused>
            </configuration>
            <executions>
              <execution>
                <id>sort-imports</id>
                <goals>
                  <goal>sort</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.github.ekryd.sortpom</groupId>
            <artifactId>sortpom-maven-plugin</artifactId>
            <version>${version.sortpom}</version>
            <configuration>
              <skip>${sortpom.skip}</skip>
              <createBackupFile>false</createBackupFile>
              <sortProperties>true</sortProperties>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sort</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
