<?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">
  <groupId>org.apache.druid.extensions</groupId>
  <artifactId>druid-parquet-extensions</artifactId>
  <name>druid-parquet-extensions</name>
  <description>druid-parquet-extensions</description>

  <parent>
    <artifactId>druid</artifactId>
    <groupId>org.apache.druid</groupId>
    <version>24.0.2</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <properties>
    <parquet.version>1.12.0</parquet.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.druid</groupId>
      <artifactId>druid-processing</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.druid</groupId>
      <artifactId>druid-server</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.druid.extensions</groupId>
      <artifactId>druid-avro-extensions</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-column</artifactId>
      <version>${parquet.version}</version>
      <exclusions>
        <exclusion>
          <groupId>commons-codec</groupId>
          <artifactId>commons-codec</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-compress</groupId>
          <artifactId>commons-compress</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-avro</artifactId>
      <version>${parquet.version}</version>
      <exclusions>
        <exclusion>
          <groupId>commons-pool</groupId>
          <artifactId>commons-pool</artifactId>
        </exclusion>
        <exclusion>
          <groupId>it.unimi.dsi</groupId>
          <artifactId>fastutil</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>${parquet.version}</version>
      <exclusions>
        <exclusion>
          <groupId>commons-pool</groupId>
          <artifactId>commons-pool</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.druid</groupId>
      <artifactId>druid-core</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.druid</groupId>
      <artifactId>druid-indexing-hadoop</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.jayway.jsonpath</groupId>
      <artifactId>json-path</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-util</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>${avro.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>hadoop2</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <!-- needed if using native batch with hdfs input source -->
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-hdfs-client</artifactId>
          <scope>runtime</scope>
        </dependency>
        <!--
        for native batch indexing with Parquet files, we require a small number of classes provided by hadoop-common and
        hadoop-mapreduce-client-core. However, both of these jars have a very large set of dependencies, the majority of
        which we do not need (and are provided by Hadoop in that environment). hadoop-common is the biggest offender,
        with things like zookeeper, jetty, just .. so much stuff. These exclusions remove ~60 jars from being unnecessarily
        bundled with this extension. There might be some alternative arrangement to get what we need, worth looking into if
        anyone is feeling adventurous.
        -->
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-mapreduce-client-core</artifactId>
          <scope>compile</scope>
          <exclusions>
            <exclusion>
              <groupId>aopalliance</groupId>
              <artifactId>aopalliance</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.commons</groupId>
              <artifactId>commons-compress</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.guava</groupId>
              <artifactId>guava</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.inject</groupId>
              <artifactId>guice</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.inject.extensions</groupId>
              <artifactId>guice-servlet</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-annotations</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-core</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-databind</artifactId>
            </exclusion>
            <exclusion>
              <groupId>javax.inject</groupId>
              <artifactId>javax</artifactId>
            </exclusion>
            <exclusion>
              <groupId>io.netty</groupId>
              <artifactId>netty</artifactId>
            </exclusion>
            <exclusion>
              <artifactId>slf4j-log4j12</artifactId>
              <groupId>org.slf4j</groupId>
            </exclusion>
            <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
              <artifactId>protobuf-java</artifactId>
              <groupId>com.google.protobuf</groupId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-common</artifactId>
          <scope>compile</scope>
          <exclusions>
            <exclusion>
              <groupId>org.apache.yetus</groupId>
              <artifactId>audience-annotations</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-codec</groupId>
              <artifactId>commons-codec</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.commons</groupId>
              <artifactId>commons-compress</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-lang</groupId>
              <artifactId>commons-lang</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.commons</groupId>
              <artifactId>commons-math3</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-net</groupId>
              <artifactId>commons-net</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.curator</groupId>
              <artifactId>curator-client</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.curator</groupId>
              <artifactId>curator-framework</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.curator</groupId>
              <artifactId>curator-recipes</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.guava</groupId>
              <artifactId>guava</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-annotations</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-core</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.fasterxml.jackson.core</groupId>
              <artifactId>jackson-databind</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.sun.jersey</groupId>
              <artifactId>jersey-core</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.sun.jersey</groupId>
              <artifactId>jersey-server</artifactId>
            </exclusion>
            <exclusion>
              <groupId>javax.servlet.jsp</groupId>
              <artifactId>jsp-api</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.code.findbugs</groupId>
              <artifactId>jsr305</artifactId>
            </exclusion>
            <exclusion>
              <groupId>javax.ws.rs</groupId>
              <artifactId>jsr311-api</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.zookeeper</groupId>
              <artifactId>zookeeper</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-api</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-log4j12</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.sun.jersey</groupId>
              <artifactId>jersey-json</artifactId>
            </exclusion>
            <exclusion>
              <groupId>log4j</groupId>
              <artifactId>log4j</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jetty-sslengine</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jetty-util</artifactId>
            </exclusion>
            <exclusion>
              <groupId>net.java.dev.jets3t</groupId>
              <artifactId>jets3t</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.mortbay.jetty</groupId>
              <artifactId>jetty</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.code.gson</groupId>
              <artifactId>gson</artifactId>
            </exclusion>
            <exclusion>
              <groupId>xmlenc</groupId>
              <artifactId>xmlenc</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.httpcomponents</groupId>
              <artifactId>httpclient</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.jcraft</groupId>
              <artifactId>jsch</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.google.protobuf</groupId>
              <artifactId>protobuf-java</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-collections</groupId>
              <artifactId>commons-collections</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-logging</groupId>
              <artifactId>commons-logging</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-cli</groupId>
              <artifactId>commons-cli</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-digester</groupId>
              <artifactId>commons-digester</artifactId>
            </exclusion>
            <exclusion>
              <groupId>commons-beanutils</groupId>
              <artifactId>commons-beanutils-core</artifactId>
            </exclusion>
            <exclusion>
              <groupId>org.apache.directory.server</groupId>
              <artifactId>apacheds-kerberos-codec</artifactId>
            </exclusion>
            <exclusion>
              <groupId>com.nimbusds</groupId>
              <artifactId>nimbus-jose-jwt</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>hadoop3</id>
      <activation>
        <property>
          <name>hadoop3.enabled</name>
          <value>true</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-client-api</artifactId>
          <version>${hadoop.compile.version}</version>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-client-runtime</artifactId>
          <version>${hadoop.compile.version}</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
