<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
  <parent>
    <groupId>org.finos.fluxnova.bpm.qa</groupId>
    <artifactId>fluxnova-qa</artifactId>
    <version>2.0.3</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>large-data-tests</artifactId>
  <name>Large Data Tests</name>

  <properties>
    <skipTests>true</skipTests>
    <jdbcBatchProcessing>true</jdbcBatchProcessing>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.finos.fluxnova.bpm</groupId>
      <artifactId>fluxnova-engine</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.finos.fluxnova.bpm</groupId>
      <artifactId>fluxnova-engine</artifactId>
      <classifier>tests</classifier>
      <scope>test</scope>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>28.2-jre</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>pl.pragmatists</groupId>
      <artifactId>JUnitParams</artifactId>
      <version>1.1.1</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  
  <build>
    <!-- filter test configurations to inject properties -->
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/camunda.cfg.xml</include>
        </includes>
      </testResource>
    </testResources>
   </build>

  <profiles>
    <profile>
      <id>distro</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>${skipTests}</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>large-data-tests</id>

      <properties>
        <skipTests>false</skipTests>
      </properties>

      <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>
            <configuration>
              <skipTests>${skipTests}</skipTests>
              <argLine>-Xmx2048m</argLine>
            </configuration>
          </plugin>
        </plugins>
      </build>

    </profile>
  
    <profile>
      <id>cfgJdbcBatchProcessingOff</id>
      <properties>
        <jdbcBatchProcessing>false</jdbcBatchProcessing>
      </properties>
    </profile>
  </profiles>


</project>
