<?xml version='1.0' encoding='UTF-8'?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <modelVersion>4.0.0</modelVersion>

   <parent>
      <groupId>org.infinispan</groupId>
      <artifactId>infinispan-integrationtests-parent</artifactId>
      <version>9.3.0.Final</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-embedded-it</artifactId>
   <name>Infinispan Embedded Integration Tests</name>
   <description>Infinispan Embedded All-in-One module Integration Tests</description>

   <dependencies>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-embedded</artifactId>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>javax.cache</groupId>
         <artifactId>cache-api</artifactId>
         <scope>provided</scope>
      </dependency>
      <!-- JPA test dependencies -->
      <dependency>
         <groupId>javax.persistence</groupId>
         <artifactId>javax.persistence-api</artifactId>
         <scope>provided</scope>
      </dependency>
      <dependency>
         <groupId>org.hibernate</groupId>
         <artifactId>hibernate-core</artifactId>
      </dependency>
       <dependency>
           <groupId>org.glassfish.jaxb</groupId>
           <artifactId>jaxb-runtime</artifactId>
       </dependency>
      <!-- JDBC test dependecies -->
       <dependency>
           <groupId>com.mchange</groupId>
           <artifactId>c3p0</artifactId>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>com.zaxxer</groupId>
           <artifactId>HikariCP</artifactId>
           <scope>provided</scope>
       </dependency>
       <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.12</version>
          <scope>test</scope>
       </dependency>
   </dependencies>

    <profiles>
        <profile>
            <id>h2</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                    <version>1.4.180</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>2.20</version>
                        <configuration>
                            <systemPropertyVariables>
                                <connection.url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection.url>
                                <driver.class>org.h2.Driver</driver.class>
                                <jgroups.bind_addr>127.0.0.1</jgroups.bind_addr>
                                <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                            </systemPropertyVariables>
                           <argLine>${forkJvmArgs} ${testjvm.jigsawArgs}</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>smoke</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>default-test</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration combine.self="override">
                    <groups combine.self="override">${defaultJUnitGroups}</groups>
                    <excludedGroups combine.self="override">${defaultExcludedJUnitGroups}</excludedGroups>
                    <systemPropertyVariables>
                       <!-- Copied from parent POM -->
                       <infinispan.test.jgroups.protocol>${infinispan.test.jgroups.protocol}</infinispan.test.jgroups.protocol>
                       <jgroups.bind_addr>127.0.0.1</jgroups.bind_addr>
                       <jgroups.join_timeout>2000</jgroups.join_timeout>
                       <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                       <log4j.configurationFile>${log4j.configurationFile}</log4j.configurationFile>
                       <build.directory>${project.build.directory}</build.directory>
                       <com.arjuna.ats.arjuna.common.propertiesFile>test-jbossts-properties.xml</com.arjuna.ats.arjuna.common.propertiesFile>

                       <!-- this is picked up in the log4j xml which prepends it to each module's log file-->
                       <infinispan.module-suffix>${infinispan.module-suffix}</infinispan.module-suffix>
                       <ansi.strip>${ansi.strip}</ansi.strip>
                       <!-- Log the correct thread name after we call Thread.setName(),
                            see https://issues.apache.org/jira/browse/LOG4J2-2052 -->
                       <AsyncLogger.ThreadNameStrategy>UNCACHED</AsyncLogger.ThreadNameStrategy>
                    </systemPropertyVariables>
                    <trimStackTrace>false</trimStackTrace>
                    <argLine>${forkJvmArgs} ${testjvm.jigsawArgs}</argLine>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit47</artifactId>
                        <version>${version.maven.surefire}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>
