<?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">
  <parent>
    <artifactId>hudi</artifactId>
    <groupId>org.apache.hudi</groupId>
    <version>0.11.0-SNAPSHOT</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>hudi-integ-test-bundle</artifactId>
  <packaging>jar</packaging>

  <properties>
    <checkstyle.skip>true</checkstyle.skip>
    <main.basedir>${project.parent.basedir}</main.basedir>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>${shadeSources}</createSourcesJar>
              <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
              </dependencyReducedPomLocation>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                  <addHeader>true</addHeader>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                  <resource>META-INF/LICENSE</resource>
                  <file>target/classes/META-INF/LICENSE</file>
                </transformer>
              </transformers>
              <artifactSet>
                <includes>
                  <include>commons-codec:commons-codec</include>
                  <include>commons-dbcp:commons-dbcp</include>
                  <include>commons-lang:commons-lang</include>
                  <include>commons-pool:commons-pool</include>

                  <include>org.apache.hudi:hudi-common</include>
                  <include>org.apache.hudi:hudi-client-common</include>
                  <include>org.apache.hudi:hudi-spark-client</include>
                  <include>org.apache.hudi:hudi-spark-common_${scala.binary.version}</include>
                  <include>org.apache.hudi:hudi-utilities_${scala.binary.version}</include>
                  <include>org.apache.hudi:hudi-spark_${scala.binary.version}</include>
                  <include>org.apache.hudi:${hudi.spark.module}_${scala.binary.version}</include>
                  <include>org.apache.hudi:hudi-hive-sync</include>
                  <include>org.apache.hudi:hudi-sync-common</include>
                  <include>org.apache.hudi:hudi-hadoop-mr</include>
                  <include>org.apache.hudi:hudi-timeline-service</include>
                  <include>org.apache.hudi:hudi-aws</include>
                  <include>org.apache.hudi:hudi-integ-test</include>

                  <include>org.jetbrains.kotlin:kotlin-stdlib-jdk8</include>
                  <include>org.jetbrains.kotlin:kotlin-stdlib</include>
                  <include>org.jetbrains.kotlin:kotlin-stdlib-common</include>
                  <include>org.jetbrains:annotations</include>
                  <include>org.jetbrains.kotlin:kotlin-stdlib-jdk7</include>

                  <include>org.eclipse.jetty:jetty-server</include>
                  <include>org.eclipse.jetty:jetty-http</include>
                  <include>org.eclipse.jetty:jetty-util</include>
                  <include>org.eclipse.jetty:jetty-io</include>
                  <include>org.eclipse.jetty:jetty-webapp</include>
                  <include>org.eclipse.jetty:jetty-xml</include>
                  <include>org.eclipse.jetty:jetty-servlet</include>
                  <include>org.eclipse.jetty:jetty-security</include>
                  <include>org.eclipse.jetty.websocket:websocket-server</include>
                  <include>org.eclipse.jetty.websocket:websocket-common</include>
                  <include>org.eclipse.jetty.websocket:websocket-api</include>
                  <include>org.eclipse.jetty.websocket:websocket-client</include>
                  <include>org.eclipse.jetty:jetty-client</include>
                  <include>org.eclipse.jetty.websocket:websocket-servlet</include>
                  <include>org.mortbay.jetty:jetty</include>
                  <include>org.mortbay.jetty:jetty-util</include>

                  <include>org.rocksdb:rocksdbjni</include>
                  <include>com.beust:jcommander</include>
                  <include>com.twitter:bijection-avro_${scala.binary.version}</include>
                  <include>com.twitter:bijection-core_${scala.binary.version}</include>
                  <include>org.apache.parquet:parquet-avro</include>
                  <include>com.twitter:parquet-avro</include>
                  <include>com.twitter.common:objectsize</include>

                  <include>io.confluent:kafka-avro-serializer</include>
                  <include>io.confluent:common-config</include>
                  <include>io.confluent:common-utils</include>
                  <include>io.confluent:kafka-schema-registry-client</include>
                  <include>org.apache.kafka:kafka_${scala.binary.version}</include>
                  <include>org.apache.kafka:kafka-clients</include>

                  <include>io.dropwizard.metrics:metrics-core</include>
                  <include>io.dropwizard.metrics:metrics-graphite</include>

                  <include>io.javalin:javalin</include>

                  <include>org.apache.spark:spark-streaming-kafka-0-10_${scala.binary.version}</include>
                  <include>com.101tec:zkclient</include>

                  <include>org.apache.hive:hive-common</include>
                  <include>org.apache.hive:hive-service</include>
                  <include>org.apache.hive:hive-metastore</include>
                  <include>org.apache.hive:hive-jdbc</include>
                  <include>org.apache.hive:hive-exec</include>

                  <include>com.esotericsoftware:kryo-shaded</include>
                  <include>org.objenesis:objenesis</include>
                  <include>com.esotericsoftware:minlog</include>
                  <include>com.yammer.metrics:metrics-core</include>

                  <include>org.apache.thrift:libfb303</include>
                  <include>org.apache.thrift:libthrift</include>

                  <include>org.apache.httpcomponents:httpclient</include>
                  <include>org.apache.httpcomponents:httpcore</include>
                  <include>org.apache.httpcomponents:fluent-hc</include>

                  <include>org.codehaus.jackson:jackson-core-asl</include>
                  <include>org.codehaus.jackson:jackson-mapper-asl</include>
                  <include>com.fasterxml.jackson.core:jackson-annotations</include>
                  <include>com.fasterxml.jackson.core:jackson-core</include>
                  <include>com.fasterxml.jackson.core:jackson-databind</include>
                  <include>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</include>

                  <include>org.apache.htrace:htrace-core</include>
                  <include>org.apache.curator:curator-framework</include>
                  <include>org.apache.curator:curator-client</include>
                  <include>org.apache.curator:curator-recipes</include>
                </includes>
              </artifactSet>
              <relocations>
                <relocation>
                  <pattern>com.beust.jcommander.</pattern>
                  <shadedPattern>org.apache.hudi.com.beust.jcommander.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.dbcp.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.commons.dbcp.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.lang.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.commons.lang.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.pool.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.commons.pool.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hive.jdbc.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hive.jdbc.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hive.common.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hive.common.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hive.common.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hadoop.hive.common.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hive.shims.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hadoop.hive.shims.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hive.thrift.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hadoop.hive.thrift.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hive.serde2.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hadoop.hive.serde2.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hive.io.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hadoop.hive.io.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hive.service.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hive.service.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hive.service.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hadoop_hive.service.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hive.org.apache.thrift.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hive.org.apache.thrift.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.thrift.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.thrift.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.facebook.fb303.</pattern>
                  <shadedPattern>org.apache.hudi.com.facebook.fb303.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hive.jdbc.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.hive.jdbc.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.esotericsoftware.kryo.</pattern>
                  <shadedPattern>org.apache.hudi.com.esotericsoftware.kryo.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.objenesis.</pattern>
                  <shadedPattern>org.apache.hudi.org.objenesis.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.esotericsoftware.minlog.</pattern>
                  <shadedPattern>org.apache.hudi.com.esotericsoftware.minlog.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.codahale.metrics.</pattern>
                  <shadedPattern>org.apache.hudi.com.codahale.metrics.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.codec.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.commons.codec.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson.dataformat.</pattern>
                  <shadedPattern>org.apache.hudi.com.fasterxml.jackson.dataformat.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.parquet.avro.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.parquet.avro.</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <!-- Use this jar's NOTICE and license file -->
                    <exclude>META-INF/NOTICE*</exclude>
                    <exclude>META-INF/LICENSE*</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/test/resources</directory>
      </resource>
    </resources>
  </build>

  <repositories>
    <repository>
      <id>confluent</id>
      <url>https://packages.confluent.io/maven/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>io.javalin</groupId>
      <artifactId>javalin</artifactId>
      <version>2.8.0</version>
    </dependency>

    <dependency>
      <groupId>io.dropwizard.metrics</groupId>
      <artifactId>metrics-core</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-scala_${scala.binary.version}</artifactId>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.dataformat</groupId>
      <artifactId>jackson-dataformat-yaml</artifactId>
      <version>2.7.4</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-common</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-common</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-hive-sync</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-spark_${scala.binary.version}</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>${hudi.spark.module}_${scala.binary.version}</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-hdfs</artifactId>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
      <classifier>tests</classifier>
      <exclusions>
        <exclusion>
          <groupId>org.mortbay.jetty</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet.jsp</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-exec</artifactId>
      <version>${hive.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-metastore</artifactId>
      <version>${hive.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-jdbc</artifactId>
      <version>${hive.version}</version>
      <classifier>standalone</classifier>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.pentaho</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-jdbc</artifactId>
      <version>${hive.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-common</artifactId>
      <version>${hive.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-hive-sync</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-client-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-spark-client</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-utilities_${scala.binary.version}</artifactId>
      <version>${project.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-integ-test</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-client-common</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-spark-client</artifactId>
      <version>${project.version}</version>
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.4</version>
    </dependency>

    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.4</version>
    </dependency>

    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <version>1.4</version>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-common</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>servlet-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_${scala.binary.version}</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-sql_${scala.binary.version}</artifactId>
    </dependency>

    <dependency>
      <groupId>com.yammer.metrics</groupId>
      <artifactId>metrics-core</artifactId>
      <version>2.2.0</version>
    </dependency>

    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-streaming_${scala.binary.version}</artifactId>
      <version>${spark.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-streaming-kafka-0-10_${scala.binary.version}</artifactId>
      <version>${spark.version}</version>
    </dependency>

    <!-- Used for SQL templating -->
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>stringtemplate</artifactId>
      <version>4.0.2</version>
    </dependency>

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

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.10.19</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro-mapred</artifactId>
      <version>1.7.7</version>
    </dependency>

    <!-- Parquet -->
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-avro</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>${parquet.version}</version>
    </dependency>

    <dependency>
      <groupId>com.twitter</groupId>
      <artifactId>bijection-avro_${scala.binary.version}</artifactId>
      <version>0.9.3</version>
    </dependency>

    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-avro-serializer</artifactId>
      <version>${confluent.version}</version>
    </dependency>

    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>common-config</artifactId>
      <version>${confluent.version}</version>
    </dependency>

    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>common-utils</artifactId>
      <version>${confluent.version}</version>
    </dependency>

    <dependency>
      <groupId>io.confluent</groupId>
      <artifactId>kafka-schema-registry-client</artifactId>
      <version>${confluent.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libfb303</artifactId>
      <version>0.9.3</version>
    </dependency>
    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>0.9.3</version>
    </dependency>

    <!-- zookeeper -->
    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-framework</artifactId>
      <version>${zk-curator.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-client</artifactId>
      <version>${zk-curator.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.curator</groupId>
      <artifactId>curator-recipes</artifactId>
      <version>${zk-curator.version}</version>
    </dependency>

  </dependencies>
</project>
