<?xml version="1.0" encoding="UTF-8"?>
<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware 
	LLC, and others contributors as indicated by the @authors tag. All rights 
	reserved. See the copyright.txt in the distribution for a full listing of 
	individual contributors. This copyrighted material is made available to anyone 
	wishing to use, modify, copy, or redistribute it subject to the terms and 
	conditions of the GNU Lesser General Public License, v. 2.1. This program 
	is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; 
	without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
	PURPOSE. See the GNU Lesser General Public License for more details. You 
	should have received a copy of the GNU Lesser General Public License, v.2.1 
	along with this distribution; if not, write to the Free Software Foundation, 
	Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
<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">
  <parent>
    <groupId>org.jboss.narayana.jta</groupId>
    <artifactId>narayana-jta-all</artifactId>
    <version>5.10.6.Final</version>
    <relativePath>../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>cdi</artifactId>
  <name>Narayana: ArjunaJTA cdi</name>
  <description>Narayana: ArjunaJTA cdi</description>
  <packaging>jar</packaging>

  <properties>
    <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>
    <server.jvm.args>
        ${jvm.args.other} ${jvm.args.memory} ${jvm.args.debug} ${jvm.args.modular}
    </server.jvm.args>
  </properties>

  <build>
    <sourceDirectory>classes</sourceDirectory>
    <resources>
      <resource>
        <directory>etc</directory>
      </resource>
    </resources>
    <testSourceDirectory>tests/classes</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>tests/resources</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.jboss.jandex</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
        <version>1.0.6</version>
        <executions>
          <execution>
            <id>make-index</id>
            <goals>
              <goal>jandex</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
      <dependency>
          <groupId>org.jboss.spec.javax.interceptor</groupId>
          <artifactId>jboss-interceptors-api_1.2_spec</artifactId>
          <version>${version.org.jboss.spec.javax.interceptor}</version>
          <scope>provided</scope>
      </dependency>
    <dependency>
      <groupId>org.jboss.spec.javax.transaction</groupId>
      <artifactId>jboss-transaction-api_1.2_spec</artifactId>
      <version>${version.org.jboss.spec.javax.transaction}</version>
      <scope>provided</scope>
    </dependency>
      <dependency>
        <groupId>org.jboss.narayana.jta</groupId>
        <artifactId>jta</artifactId>
        <version>${project.version}</version>
      </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${version.junit}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.protocol</groupId>
      <artifactId>arquillian-protocol-servlet</artifactId>
      <version>${version.org.jboss.arquillian.core}</version>
      <scope>test</scope>
    </dependency>
      <dependency>
          <groupId>javax.enterprise</groupId>
          <artifactId>cdi-api</artifactId>
          <version>${version.javax.enterprise}</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>org.jboss.arquillian.junit</groupId>
          <artifactId>arquillian-junit-container</artifactId>
          <version>${version.org.jboss.arquillian.core}</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
          <version>${version.javax.annotation}</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>org.jboss</groupId>
          <artifactId>jboss-transaction-spi</artifactId>
          <version>${version.org.jboss.jboss-transaction-spi}</version>
          <scope>provided</scope>
          <exclusions>
              <exclusion>
                  <groupId>org.jboss.logging</groupId>
                  <artifactId>jboss-logging-spi</artifactId>
              </exclusion>
          </exclusions>
      </dependency>
      <dependency>
          <groupId>org.jboss.spec.javax.ejb</groupId>
          <artifactId>jboss-ejb-api_3.1_spec</artifactId>
          <version>${version.org.jboss.spec.javax.ejb}</version>
          <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>${version.org.jboss.logging.jboss-logging}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-processor</artifactId>
        <version>${version.org.jboss.logging.jboss-logging-processor}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
          <groupId>io.smallrye.reactive</groupId>
          <artifactId>smallrye-reactive-converter-api</artifactId>
          <version>${version.smallrye-converter-api}</version>
          <scope>provided</scope>
      </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>arq</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.arquillian</groupId>
                    <artifactId>wildfly-arquillian-container-managed</artifactId>
                    <version>${version.org.wildfly.arquillian}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <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>
                    <version>${version.org.wildfly.arquillian}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <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>
            <build>
                <plugins>
                    <plugin>
                        <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>
            <dependencies>
                <dependency>
                        <groupId>org.wildfly.arquillian</groupId>
                        <artifactId>wildfly-arquillian-container-remote</artifactId>
                        <version>${version.org.wildfly.arquillian}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </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>
                        <executions>
                            <execution>
                                <id>default-install</id>
                                <phase>install</phase>
                            </execution>
                        </executions>
                        <inherited>false</inherited>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>j9</id>
            <activation>
                <jdk>[1.9,11)</jdk>
            </activation>
            <properties>
                <jvm.args.modular>
                    --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.security=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED
                </jvm.args.modular>
            </properties>
        </profile>
        <profile>
            <id>jdk11</id>
            <activation>
                <jdk>[11,)</jdk>
            </activation>
            <properties>
                <jvm.args.modular>--add-modules=java.se</jvm.args.modular>
            </properties>
        </profile>
    </profiles>
</project>
