<?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-jcache-parent</artifactId>
      <version>15.0.21.Final</version>
      <relativePath>../pom.xml</relativePath>
   </parent>

   <artifactId>infinispan-jcache-tck-runner-embedded</artifactId>
   <packaging>jar</packaging>
   <name>Infinispan JCACHE (JSR-107) TCK Runner Embedded</name>
   <description>JCACHE (JSR-107) TCK runner for Infinispan implementations</description>

   <properties>
      <tck.mbean.builder>org.infinispan.jcache.tck.TckMbeanServerBuilder</tck.mbean.builder>
      <tck.mbean.server>TckMbeanServer</tck.mbean.server>

      <embedded.CacheManagerImpl>org.infinispan.jcache.embedded.JCacheManager</embedded.CacheManagerImpl>
      <embedded.CacheImpl>org.infinispan.jcache.embedded.JCache</embedded.CacheImpl>
      <embedded.CacheEntryImpl>org.infinispan.jcache.JCacheEntry</embedded.CacheEntryImpl>
      <embedded.CacheInvocationContextImpl>org.infinispan.jcache.annotation.CacheKeyInvocationContextImpl</embedded.CacheInvocationContextImpl>

      <jvm.x64.args />
   </properties>

   <dependencies>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-jcache</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-jcache-commons</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-jcache-commons</artifactId>
         <type>test-jar</type>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.infinispan</groupId>
         <artifactId>infinispan-commons-test</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>org.hamcrest</groupId>
         <artifactId>hamcrest-library</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>javax.cache</groupId>
         <artifactId>cache-tests</artifactId>
         <scope>test</scope>
      </dependency>
      <dependency>
         <groupId>javax.cache</groupId>
         <artifactId>cache-tests</artifactId>
         <classifier>tests</classifier>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <testResources>
         <testResource>
            <directory>src/test/resources</directory>
            <filtering>true</filtering>
         </testResource>
      </testResources>

      <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>

         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
               <execution>
                  <goals>
                     <goal>integration-test</goal>
                     <goal>verify</goal>
                  </goals>
               </execution>
            </executions>
            <configuration>
               <dependenciesToScan>
                  <!-- TCK tests -->
                  <dependency>javax.cache:cache-tests</dependency>
               </dependenciesToScan>
               <includes>
                  <include>**/Test*.java</include>
                  <include>**/*Test.java</include>
                  <include>**/*TestCase.java</include>
               </includes>
               <disableXmlReport>false</disableXmlReport>
               <systemPropertyVariables>
                  <ExcludeList>ExcludeList_embedded</ExcludeList>
                  <javax.cache.CacheManager>${embedded.CacheManagerImpl}</javax.cache.CacheManager>
                  <javax.cache.Cache>${embedded.CacheImpl}</javax.cache.Cache>
                  <javax.cache.Cache.Entry>${embedded.CacheEntryImpl}</javax.cache.Cache.Entry>
                  <jgroups.join_timeout>2000</jgroups.join_timeout>

                  <javax.management.builder.initial>${tck.mbean.builder}</javax.management.builder.initial>
                  <org.jsr107.tck.management.agentId>${tck.mbean.server}</org.jsr107.tck.management.agentId>
                  <java.net.preferIPv4Stack>true</java.net.preferIPv4Stack>
                  <jgroups.join_timeout>2000</jgroups.join_timeout>
                  <infinispan.test.checkThreadLeaks>false</infinispan.test.checkThreadLeaks>

                  <log4j.configurationFile>${log4j.configurationFile}</log4j.configurationFile>
                  <log4j2.contextSelector>org.apache.logging.log4j.core.selector.BasicContextSelector</log4j2.contextSelector>
                  <java.util.logging.manager>org.apache.logging.log4j.jul.LogManager</java.util.logging.manager>
                  <!-- this is picked up in log4j2.xml, which adds it to each module's log file name-->
                  <infinispan.module-suffix>${infinispan.module-suffix}</infinispan.module-suffix>
                  <ansi.strip>${ansi.strip}</ansi.strip>
               </systemPropertyVariables>
               <argLine>${forkJvmArgs} ${testjvm.jdkSpecificArgs}</argLine>
               <properties>
                  <listener>${junitListener}</listener>
               </properties>
            </configuration>
            <dependencies>
               <dependency>
                  <groupId>org.apache.maven.surefire</groupId>
                  <artifactId>surefire-junit47</artifactId>
                  <version>${version.maven.surefire}</version>
               </dependency>
            </dependencies>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <id>test-basic-cache</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-failsafe-plugin</artifactId>
                  <configuration>
                     <excludes>
                        <exclude>**/interceptor/*Test.java</exclude>
                     </excludes>
                     <systemPropertyVariables>
                        <jgroups.join_timeout>2000</jgroups.join_timeout>
                     </systemPropertyVariables>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>

      <profile>
         <id>test-optional-cache</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-failsafe-plugin</artifactId>
                  <configuration>
                     <includes>
                        <include>**/interceptor/*Test.java</include>
                     </includes>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>

      <profile>
         <id>smoke</id>
         <properties>
            <skipTests>true</skipTests>
         </properties>
      </profile>
   </profiles>
</project>
