<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 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-minicluster</artifactId>
  <name>Kite Minicluster</name>
  <description />

  <parent>
    <groupId>org.kitesdk</groupId>
    <artifactId>kite-parent</artifactId>
    <version>1.1.0</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <properties>
    <!-- TODO move to parent POM when building for multiple profiles -->
    <vers.hive-cdh5>1.1.0-cdh${cdh5.version}</vers.hive-cdh5>
    <vers.flume-cdh5>1.5.0-cdh${cdh5.version}</vers.flume-cdh5>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
              <includeScope>runtime</includeScope> <!-- excludes test jars; see http://jira.codehaus.org/browse/MDEP-128 -->

            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>

    </plugins>
  </build>

  <!-- Seems like these reporting plugins aren't properly inherited from 
    the parent pom's pluginManagement. The docs say it's supposed to work. -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>${vers.maven-project-info-reports-plugin}</version>
        <configuration>
          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
        </configuration>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>dependency-info</report>
              <report>dependencies</report>
              <report>license</report>
              <report>project-team</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${vers.maven-javadoc-plugin}</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-hadoop-cdh5-dependencies</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-hbase-cdh5-dependencies</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-hadoop-cdh5-test-dependencies</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-hbase-cdh5-test-dependencies</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>

    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-metastore</artifactId>
      <version>${vers.hive-cdh5}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-common</artifactId>
      <version>${vers.hive-cdh5}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-serde</artifactId>
      <version>${vers.hive-cdh5}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-exec</artifactId>
      <version>${vers.hive-cdh5}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-service</artifactId>
      <version>${vers.hive-cdh5}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.flume</groupId>
      <artifactId>flume-ng-node</artifactId>
      <version>${vers.flume-cdh5}</version>
      <exclusions>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- TODO: use the following instead of bundling the DatasetSink classes
         directly when FLUME-2469 is released -->
    <!--
    <dependency>
      <groupId>org.apache.flume.flume-ng-sinks</groupId>
      <artifactId>flume-dataset-sink</artifactId>
      <version>${vers.flume-cdh5}</version>
      <exclusions>
        <exclusion>
          <groupId>org.kitesdk</groupId>
          <artifactId>kite-data-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.avro</groupId>
          <artifactId>avro</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-common</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    -->

    <dependency>
      <groupId>org.kitesdk</groupId>
      <artifactId>kite-data-hive</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>com.beust</groupId>
      <artifactId>jcommander</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
  </dependencies>

</project>
