<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.jboss.narayana.jts</groupId>
    <artifactId>narayana-jts-all</artifactId>
    <version>7.3.4.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>jtax</artifactId>
  <packaging>jar</packaging>
  <name>Narayana: ArjunaJTS jtax</name>
  <description>Narayana: ArjunaJTS jtax</description>

  <properties>
    <idlj.boot.args></idlj.boot.args>
    <modular.jdk.args>--upgrade-module-path ${project.build.directory}/upgrademodulepath</modular.jdk.args>
    <surefireArgLine></surefireArgLine>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.jboss.narayana</groupId>
        <artifactId>test-dependency-management</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.jboss.byteman</groupId>
      <artifactId>byteman</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.byteman</groupId>
      <artifactId>byteman-submit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.byteman</groupId>
      <artifactId>byteman-install</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.byteman</groupId>
      <artifactId>byteman-bmunit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.narayana.jta</groupId>
      <artifactId>jta</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.narayana.jts</groupId>
      <artifactId>jts</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.narayana.jts</groupId>
      <artifactId>orbportability</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.narayana.jts</groupId>
      <artifactId>idlj-idl-openjdk</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.openjdk-orb</groupId>
      <artifactId>openjdk-orb</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.resource</groupId>
      <artifactId>jakarta.resource-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss</groupId>
      <artifactId>jboss-transaction-spi</artifactId>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>org.jboss.logging</groupId>
          <artifactId>jboss-logging-spi</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging-annotations</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <sourceDirectory>classes</sourceDirectory>
    <testSourceDirectory>tests/classes</testSourceDirectory>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>release</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
              <execution>
                <id>empty-javadoc-jar</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <classifier>javadoc</classifier>
                  <classesDirectory>${basedir}/javadoc</classesDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>testing</id>
      <activation>
        <property>
          <name>!release</name>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.jboss.narayana</groupId>
          <artifactId>common</artifactId>
          <classifier>tests</classifier>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jboss.narayana.jta</groupId>
          <artifactId>jta</artifactId>
          <classifier>tests</classifier>
          <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.jboss.narayana.jts</groupId>
          <artifactId>idlj-idl-openjdk</artifactId>
          <classifier>tests</classifier>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <executions>
              <execution>
                <id>default-test</id>
                <goals>
                  <goal>test</goal>
                </goals>
                <phase>test</phase>
                <configuration>
                  <argLine>@{surefireArgLine} -Djdk.attach.allowAttachSelf=true ${idlj.boot.args}</argLine>
                  <skip>false</skip>
                  <systemProperties combine.children="append">
                    <property>
                      <name>java.util.logging.config.file</name>
                      <value>${basedir}/src/test/resources/logging.properties</value>
                    </property>
                  </systemProperties>
                  <excludes>
                    <exclude>**/common/**</exclude>
                    <exclude>**/ExampleXAResource.java</exclude>
                    <exclude>**/JTSTestCase.java</exclude>
                    <exclude>**/LastOnePhaseResource.java</exclude>
                    <exclude>**/implicit/**</exclude>
                  </excludes>
                  <reportsDirectory>${project.build.directory}/idlj-openjdk-surefire-reports</reportsDirectory>
                  <systemPropertyVariables combine.children="append">
                    <OrbPortabilityEnvironmentBean.orbImpleClassName>com.arjuna.orbportability.internal.orbspecific.javaidl.orb.implementations.javaidl_1_4</OrbPortabilityEnvironmentBean.orbImpleClassName>
                    <OrbPortabilityEnvironmentBean.poaImpleClassName>com.arjuna.orbportability.internal.orbspecific.javaidl.oa.implementations.javaidl_1_4</OrbPortabilityEnvironmentBean.poaImpleClassName>
                    <OrbPortabilityEnvironmentBean.orbDataClassName>com.arjuna.orbportability.internal.orbspecific.versions.javaidl_1_4</OrbPortabilityEnvironmentBean.orbDataClassName>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
