<?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>
  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>39</version>
    <relativePath></relativePath>
  </parent>
  <groupId>org.jboss</groupId>
  <artifactId>jboss-transaction-spi</artifactId>
  <version>9.0.0.Final</version>
  <packaging>jar</packaging>
  <name>JBoss Transaction SPI</name>
  <description>The Java Transaction SPI classes</description>
  <url>https://github.com/jbosstm/jboss-transaction-spi</url>

  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:jbosstm/jboss-transaction-spi.git</connection>
    <developerConnection>scm:git:git@github.com:jbosstm/jboss-transaction-spi.git</developerConnection>
    <url>https://github.com/jbosstm/jboss-transaction-spi</url>
  </scm>
  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/jbosstm/jboss-transaction-spi/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshot Repository</name>
      <url>https://repository.jboss.org/nexus/repository/snapshots/</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <checkstyle.skip>true</checkstyle.skip>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <nexus.repository.release>narayana</nexus.repository.release>
    <nexus.repository.staging>narayana-staging</nexus.repository.staging>
    <nexus.repository.url>https://repository.jboss.org/nexus/</nexus.repository.url>
    <nexus.serverId>jboss-releases-repository</nexus.serverId>
    <nexus.staging.tag>jboss-transaction-spi-${project.version}</nexus.staging.tag>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Release pipeline (JBTM-3997 / JBTM-3998) -->
    <skip.maven-deploy-plugin>false</skip.maven-deploy-plugin>
    <!-- The base directory for the maven release plugin to create the tag -->
    <tagBase>https://svn.jboss.org/repos/jbossas/projects/integration/tags/</tagBase>
    <version.io.narayana.checkstyle-config>1.0.1.Final</version.io.narayana.checkstyle-config>
    <version.jakarta.resource.jakarta-resource-api>2.1.0</version.jakarta.resource.jakarta-resource-api>
    <version.jakarta.transaction.jakarta-transaction-api>2.0.1</version.jakarta.transaction.jakarta-transaction-api>
    <version.javadoc.plugin>3.5.0</version.javadoc.plugin>
    <version.org.jboss.logging.jboss-logging>3.5.3.Final</version.org.jboss.logging.jboss-logging>
    <version.org.sonatype.plugins.nxrm3.plugin>1.0.7</version.org.sonatype.plugins.nxrm3.plugin>
    <version.sortpom>3.0.0</version.sortpom>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <version>${version.org.jboss.logging.jboss-logging}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.resource</groupId>
      <artifactId>jakarta.resource-api</artifactId>
      <version>${version.jakarta.resource.jakarta-resource-api}</version>
    </dependency>
    <dependency>
      <groupId>jakarta.transaction</groupId>
      <artifactId>jakarta.transaction-api</artifactId>
      <version>${version.jakarta.transaction.jakarta-transaction-api}</version>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>jbossThirdParty</id>
      <url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>jboss-public-repository-group</id>
      <name>JBoss Public Maven Repository Group</name>
      <url>https://repository.jboss.org/nexus/content/groups/public/</url>
    </repository>
  </repositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nxrm3-maven-plugin</artifactId>
          <version>${version.org.sonatype.plugins.nxrm3.plugin}</version>
          <configuration>
            <serverId>${nexus.serverId}</serverId>
            <nexusUrl>${nexus.repository.url}</nexusUrl>
            <repository>${nexus.repository.staging}</repository>
            <tag>${nexus.staging.tag}</tag>
            <sourceRepository>${nexus.repository.staging}</sourceRepository>
            <destinationRepository>${nexus.repository.release}</destinationRepository>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <configuration>
          <skip>${skip.maven-deploy-plugin}</skip>
        </configuration>
      </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>
        <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>
          <!-- checkstyle is set to be run on particular modules by disabling skip -->
          <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>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <configuration>
          <createBackupFile>false</createBackupFile>
          <sortProperties>true</sortProperties>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>sort</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
        </property>
      </activation>
      <properties>
        <skip.maven-deploy-plugin>true</skip.maven-deploy-plugin>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${version.javadoc.plugin}</version>
            <configuration>
              <release>17</release>
              <detectOfflineLinks>false</detectOfflineLinks>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>nexusStagingDeployment</id>
      <activation>
        <property>
          <name>releaseStaging</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nxrm3-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>nexus-staging-deploy</id>
                <goals>
                  <goal>staging-deploy</goal>
                </goals>
                <phase>deploy</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
