<?xml version="1.0" encoding="UTF-8"?>
<!--
  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>
  <parent>
    <groupId>org.apache.orc</groupId>
    <artifactId>orc</artifactId>
    <version>1.7.3</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>orc-benchmarks</artifactId>
  <packaging>pom</packaging>
  <name>ORC Benchmarks</name>
  <description>
    Benchmarks for comparing ORC, Parquet, JSON, and Avro performance.
  </description>

  <properties>
    <avro.version>1.11.0</avro.version>
    <hive.version>3.1.2</hive.version>
    <jmh.version>1.20</jmh.version>
    <orc.version>${project.version}</orc.version>
    <parquet.version>1.12.2</parquet.version>
    <spark.version>3.2.1</spark.version>
    <jackson.version>2.12.4</jackson.version>
    <hadoop.version>3.3.1</hadoop.version>
    <junit.version>5.8.2</junit.version>
  </properties>

  <modules>
    <module>core</module>
    <module>hive</module>
    <module>spark</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.vintage</groupId>
        <artifactId>junit-vintage-engine</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-params</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.auto.service</groupId>
        <artifactId>auto-service</artifactId>
        <version>1.0</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.2.4</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
      </dependency>
      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>1.3.1</version>
      </dependency>
      <dependency>
        <groupId>io.airlift</groupId>
        <artifactId>aircompressor</artifactId>
        <version>0.21</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.1.68.Final</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro</artifactId>
        <version>${avro.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro-mapred</artifactId>
        <version>${avro.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.8</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${hadoop.version}</version>
	<exclusions>
	  <exclusion>
	    <groupId>com.sun.jersey</groupId>
	    <artifactId>jersey-server</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>com.sun.jersey</groupId>
	    <artifactId>jersey-core</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>commons-beanutils</groupId>
	    <artifactId>commons-beanutils</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>commons-beanutils</groupId>
	    <artifactId>commons-beanutils-core</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>javax.servlet</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
          <exclusion>
            <groupId>jdk.tools</groupId>
            <artifactId>jdk.tools</artifactId>
          </exclusion>
	  <exclusion>
	    <groupId>org.mortbay.jetty</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-client</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-hdfs</artifactId>
        <version>${hadoop.version}</version>
        <scope>runtime</scope>
	<exclusions>
	  <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</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.fusesource.leveldbjni</groupId>
	    <artifactId>leveldbjni-all</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.mortbay.jetty</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-yarn-common</artifactId>
        <version>${hadoop.version}</version>
        <scope>runtime</scope>
	<exclusions>
	  <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.inject</groupId>
	    <artifactId>javax.inject</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>javax.servlet</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-core</artifactId>
        <version>${hadoop.version}</version>
	<exclusions>
	  <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.inject</groupId>
	    <artifactId>javax.inject</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>javax.servlet</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-exec</artifactId>
        <classifier>core</classifier>
        <version>${hive.version}</version>
	<exclusions>
	  <exclusion>
	    <groupId>org.apache.calcite</groupId>
	    <artifactId>calcite-core</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.calcite</groupId>
	    <artifactId>calcite-druid</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.calcite.avatica</groupId>
	    <artifactId>avatica</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.hadoop</groupId>
	    <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.logging.log4j</groupId>
	    <artifactId>log4j-1.2-api</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.logging.log4j</groupId>
	    <artifactId>log4j-slf4j-impl</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>stax</groupId>
	    <artifactId>stax-api</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-serde</artifactId>
        <version>${hive.version}</version>
	<exclusions>
	  <exclusion>
	    <groupId>javax.servlet</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.logging.log4j</groupId>
	    <artifactId>log4j-1.2-api</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.logging.log4j</groupId>
	    <artifactId>log4j-slf4j-impl</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.logging.log4j</groupId>
	    <artifactId>log4j-web</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.apache.parquet</groupId>
	    <artifactId>parquet-hadoop-bundle</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.eclipse.jetty.aggregate</groupId>
	    <artifactId>jetty-all</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.eclipse.jetty.orbit</groupId>
	    <artifactId>javax.servlet</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-service-rpc</artifactId>
        <version>${hive.version}</version>
	<exclusions>
	  <exclusion>
	    <groupId>tomcat</groupId>
	    <artifactId>jasper-compiler</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-storage-api</artifactId>
        <version>${storage-api.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-benchmarks-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-core</artifactId>
        <version>${orc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-mapreduce</artifactId>
        <version>${orc.version}</version>
	<scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.parquet</groupId>
        <artifactId>parquet-hadoop</artifactId>
        <version>${parquet.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.xerial.snappy</groupId>
        <artifactId>snappy-java</artifactId>
        <version>1.1.8.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.parquet</groupId>
        <artifactId>parquet-avro</artifactId>
        <version>${parquet.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-catalyst_2.12</artifactId>
        <version>${spark.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_2.12</artifactId>
        <version>${spark.version}</version>
	<exclusions>
	  <exclusion>
	    <groupId>org.apache.avro</groupId>
	    <artifactId>avro-mapred</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.glassfish.hk2.external</groupId>
	    <artifactId>aopalliance-repackaged</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.mortbay.jetty</groupId>
	    <artifactId>servlet-api</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.slf4j</groupId>
	    <artifactId>jcl-over-slf4j</artifactId>
	  </exclusion>
	  <exclusion>
	    <groupId>org.fusesource.leveldbjni</groupId>
	    <artifactId>leveldbjni-all</artifactId>
	  </exclusion>
	</exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_2.12</artifactId>
        <version>${spark.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.orc</groupId>
            <artifactId>orc-core</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.orc</groupId>
            <artifactId>orc-mapreduce</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.parquet</groupId>
            <artifactId>parquet-column</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-avro_2.12</artifactId>
        <version>${spark.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jodd</groupId>
        <artifactId>jodd-core</artifactId>
        <version>3.5.2</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-core</artifactId>
        <version>${jmh.version}</version>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-generator-annprocess</artifactId>
        <version>${jmh.version}</version>
      </dependency>
      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>2.12.15</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
	<scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
	<scope>runtime</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <sourceDirectory>${basedir}/src/java</sourceDirectory>
    <testSourceDirectory>${basedir}/src/test</testSourceDirectory>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <ignoredDependencies>
            <ignoredDependency>*:*</ignoredDependency>
          </ignoredDependencies>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${maven-assembly-plugin.version}</version>
          <configuration>
            <descriptors>
              <descriptor>src/assembly/uber.xml</descriptor>
            </descriptors>
          </configuration>
          <executions>
            <execution>
              <id>make-assembly</id> <!-- this is used for inheritance merges -->
              <phase>package</phase> <!-- bind to the packaging phase -->
              <goals>
                <goal>single</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>cmake</id>
      <build>
        <directory>${build.dir}/bench</directory>
      </build>
    </profile>
  </profiles>
</project>
