<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2013 Cloudera Inc.
~
~ Licensed 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>
  <artifactId>kite-data-crunch</artifactId>

  <parent>
    <groupId>org.kitesdk</groupId>
    <artifactId>kite-data</artifactId>
    <version>0.17.0</version>
  </parent>

  <name>Kite Data Crunch Module</name>
  <description>
    The Kite Data Crunch module provides Crunch support for working with Kite datasets.
  </description>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <!-- Make sure derby.log goes to target/ subdir
                   when running tests involving Hive -->
              <name>derby.stream.error.file</name>
              <value>target/derby.log</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <inherited>false</inherited>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>dependency-info</report>
              <report>dependencies</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>
    <!-- Kite -->
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-core</artifactId>
      <version>0.17.0</version>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-mapreduce</artifactId>
      <version>0.17.0</version>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-hive</artifactId>
      <version>0.17.0</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-hbase</artifactId>
      <version>0.17.0</version>
      <optional>true</optional>
    </dependency>

    <!-- Hadoop -->

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>${artifact.hadoop-deps}</artifactId>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>${artifact.hbase-deps}</artifactId>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-hadoop-compatibility</artifactId>
    </dependency>

    <!-- Crunch -->
    <dependency>
      <groupId>org.apache.crunch</groupId>
      <artifactId>crunch-core</artifactId>
    </dependency>

    <!-- Formats -->
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
    </dependency>

    <!-- These should be compile-dependencies of kite-data-hive
         But, hive-exec includes classes from other modules at Hive-specific
         versions, including avro's Schema. This causes errors in this and
         other modules, so these are marked provided.
         -->
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-exec</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-serde</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- Test Dependencies -->

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

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-core</artifactId>
      <version>0.17.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-hbase</artifactId>
      <version>0.17.0</version>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>${artifact.hadoop-test-deps}</artifactId>
      <type>pom</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>${artifact.hbase-test-deps}</artifactId>
      <type>pom</type>
      <scope>test</scope>
    </dependency>

    <!-- fix hbase/hive thrift version conflict -->
    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>0.9.0</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

</project>
