<?xml version="1.0"?>
<!--

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

-->
<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>pinot</artifactId>
    <groupId>org.apache.pinot</groupId>
    <version>1.3.0</version>
  </parent>
  <artifactId>pinot-integration-tests</artifactId>
  <name>Pinot Integration Tests</name>
  <url>https://pinot.apache.org/</url>

  <properties>
    <pinot.root>${basedir}/..</pinot.root>
  </properties>

  <profiles>
    <profile>
      <id>codecoverage</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>report</id>
                <phase>test</phase>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <skip>false</skip>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>no-integration-tests</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>integration-tests-set-1</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
              <includes>
                <include>**/org/apache/pinot/integration/tests/A*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/B*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/C*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/D*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/E*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/F*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/G*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/H*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/I*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/J*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/K*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/L*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/M*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/N*Test.java</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>integration-tests-set-2</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
              <includes>
                <include>**/org/apache/pinot/integration/tests/O*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/P*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/Q*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/R*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/S*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/T*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/tpch/*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/U*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/V*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/W*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/X*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/Y*Test.java</include>
                <include>**/org/apache/pinot/integration/tests/Z*Test.java</include>
                <include>**/org/apache/pinot/server/realtime/**</include>
              </includes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>custom-cluster-integration-test-suite</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skipTests>false</skipTests>
              <suiteXmlFiles>
                <suiteXmlFile>src/test/resources/custom-cluster-integration-test-suite.xml</suiteXmlFile>
              </suiteXmlFiles>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-tools</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-jdbc-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-segment-writer-file-based</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-common</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-core</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-controller</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-broker</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-server</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-minion</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-integration-test-base</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>kafka</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.jnr</groupId>
      <artifactId>jnr-posix</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_${scala.compat.version}</artifactId>
      <version>${spark3.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.pinot</groupId>
      <artifactId>pinot-batch-ingestion-spark-3</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
