<?xml version="1.0" encoding="UTF-8"?>
<!--
    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>
    <groupId>org.apache.carbondata</groupId>
    <artifactId>carbondata-parent</artifactId>
    <version>2.2.0-h0.cbu.mrs.320.r11</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>

  <artifactId>carbondata-examples</artifactId>
  <name>Apache CarbonData :: Examples</name>

  <properties>
    <dev.path>${basedir}/../../dev</dev.path>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
      <version>${dep.jackson.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.carbondata</groupId>
      <artifactId>carbondata-mv-plan_${spark.binary.version}</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.carbondata</groupId>
      <artifactId>carbondata-spark_${spark.binary.version}</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>${httpclient.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.thrift</groupId>
          <artifactId>libthrift</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <version>${httpcore.version}</version>
    </dependency>
    <dependency>
      <groupId>org.alluxio</groupId>
      <artifactId>alluxio-core-client-hdfs</artifactId>
      <version>1.8.1</version>
      <exclusions>
        <exclusion>
          <groupId>io.netty</groupId>
          <artifactId>netty-all</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.thrift</groupId>
          <artifactId>libthrift</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-all</artifactId>
      <version>4.1.50.Final</version>
    </dependency>
    <dependency>
      <groupId>org.alluxio</groupId>
      <artifactId>alluxio-shell</artifactId>
      <version>1.8.1</version>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_${scala.binary.version}</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <testSourceDirectory>src/test/scala</testSourceDirectory>
    <resources>
      <resource>
        <directory>src/resources</directory>
      </resource>
      <resource>
        <directory>.</directory>
        <includes>
          <include>CARBON_SPARK_INTERFACELogResource.properties</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.18</version>
        <!-- Note config is repeated in scalatest config -->
        <configuration>
          <skip>false</skip>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
          <systemProperties>
            <java.awt.headless>true</java.awt.headless>
          </systemProperties>
          <testFailureIgnore>false</testFailureIgnore>
          <failIfNoTests>false</failIfNoTests>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <version>2.15.2</version>
        <executions>
          <execution>
            <id>compile</id>
            <goals>
              <goal>compile</goal>
            </goals>
            <phase>compile</phase>
          </execution>
          <execution>
            <id>testCompile</id>
            <goals>
              <goal>testCompile</goal>
            </goals>
            <phase>test</phase>
          </execution>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4.1</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.ning.maven.plugins</groupId>
        <artifactId>maven-duplicate-finder-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <version>1.0</version>
        <!-- Note config is repeated in surefire config -->
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
          <junitxml>.</junitxml>
          <testFailureIgnore>false</testFailureIgnore>
          <filereports>CarbonTestSuite.txt</filereports>
          <argLine>${argLine}</argLine>
          <stderr />
          <environmentVariables>
          </environmentVariables>
          <systemProperties>
            <java.awt.headless>true</java.awt.headless>
          </systemProperties>
        </configuration>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>sdvtest</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
      </properties>
    </profile>
    <profile>
      <id>spark-2.3</id>
      <properties>
        <spark.binary.version>3.1</spark.binary.version>
      </properties>
    </profile>
    <profile>
      <id>spark-2.4</id>
      <properties>
        <spark.binary.version>3.1</spark.binary.version>
      </properties>
    </profile>
    <profile>
      <id>spark-3.1</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <spark.binary.version>3.1</spark.binary.version>
      </properties>
    </profile>
  </profiles>
</project>
