<?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.jta</groupId>
    <artifactId>narayana-jta-all</artifactId>
    <version>7.2.0.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <artifactId>cdi</artifactId>
  <packaging>jar</packaging>
  <name>Narayana: ArjunaJTA cdi</name>
  <description>Narayana: ArjunaJTA cdi</description>

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

  <dependencies>
    <dependency>
      <groupId>org.jboss.narayana.jta</groupId>
      <artifactId>jta</artifactId>
    </dependency>

    <dependency>
      <groupId>jakarta.interceptor</groupId>
      <artifactId>jakarta.interceptor-api</artifactId>
    </dependency>

    <dependency>
      <groupId>jakarta.transaction</groupId>
      <artifactId>jakarta.transaction-api</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>jakarta.inject</groupId>
      <artifactId>jakarta.inject-api</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.enterprise</groupId>
      <artifactId>jakarta.enterprise.cdi-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.invocation</groupId>
      <artifactId>jboss-invocation</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-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>jakarta.ejb</groupId>
      <artifactId>jakarta.ejb-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging-processor</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye.reactive</groupId>
      <artifactId>smallrye-reactive-converter-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.microprofile.reactive-streams-operators</groupId>
      <artifactId>microprofile-reactive-streams-operators-api</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.protocol</groupId>
      <artifactId>arquillian-protocol-servlet-jakarta</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>etc</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>tests/resources</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>io.smallrye</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
    <sourceDirectory>classes</sourceDirectory>
    <testSourceDirectory>tests/classes</testSourceDirectory>
  </build>

  <profiles>
    <profile>
      <id>arq</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>false</skip>
              <systemPropertyVariables combine.children="append">
                <server.jvm.args>${server.jvm.args}</server.jvm.args>
                <node.address>127.0.0.1</node.address>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>arqIPv6</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-managed</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>false</skip>
              <argLine>${ipv6.server.jvm.args}</argLine>
              <systemPropertyVariables combine.children="append">
                <!--
                                    Used in arquillian.xml
                                -->
                <server.jvm.args>${server.jvm.args} ${ipv6.server.jvm.args}</server.jvm.args>
                <node.address>[::1]</node.address>
              </systemPropertyVariables>
              <redirectTestOutputToFile>true</redirectTestOutputToFile>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>arq-remote</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.wildfly.arquillian</groupId>
          <artifactId>wildfly-arquillian-container-remote</artifactId>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>false</skip>
              <systemPropertyVariables combine.children="append">
                <!--
                                    Used in arquillian.xml
                                -->
                <node.address>127.0.0.1</node.address>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>codeCoverage</id>
      <properties>
        <server.jvm.args>${jvm.args.other} ${jvm.args.memory} ${jvm.args.debug} ${jvm.args.jacoco} ${jvm.args.modular}</server.jvm.args>
      </properties>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <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-install-plugin</artifactId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>default-install</id>
                <phase>install</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
