<?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</groupId>
    <artifactId>apache</artifactId>
    <version>18</version>
  </parent>
  <groupId>org.apache.orc</groupId>
  <artifactId>orc</artifactId>
  <version>1.5.2</version>
  <packaging>pom</packaging>

  <name>Apache ORC</name>
  <url>http://orc.apache.org</url>
  <description>
     ORC is a self-describing type-aware columnar file format designed
     for Hadoop workloads. It is optimized for large streaming reads,
     but with integrated support for finding required rows
     quickly. Storing data in a columnar format lets the reader read,
     decompress, and process only the values that are required for the
     current query.
  </description>
  <inceptionYear>2013</inceptionYear>

  <mailingLists>
    <mailingList>
      <name>ORC User List</name>
      <subscribe>user-subscribe@orc.apache.org</subscribe>
      <unsubscribe>user-unsubscribe@orc.apache.org</unsubscribe>
      <post>user@orc.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/orc-user/</archive>
    </mailingList>
    <mailingList>
      <name>ORC Developer List</name>
      <subscribe>dev-subscribe@orc.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@orc.apache.org</unsubscribe>
      <post>dev@orc.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/orc-dev/</archive>
    </mailingList>
  </mailingLists>

  <modules>
    <module>shims</module>
    <module>core</module>
    <module>mapreduce</module>
    <module>tools</module>
    <module>examples</module>
  </modules>

  <properties>
    <!-- Build Properties -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>
    <test.tmp.dir>${project.build.directory}/testing-tmp</test.tmp.dir>
    <example.dir>${project.basedir}/../../examples</example.dir>

    <min.hadoop.version>2.2.0</min.hadoop.version>
    <hadoop.version>2.7.3</hadoop.version>
    <storage-api.version>2.6.0</storage-api.version>
    <zookeeper.version>3.4.6</zookeeper.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M1</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.2.1</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.10.4</version>
        <configuration>
          <links>
            <link>http://hadoop.apache.org/docs/r${hadoop.version}/api</link>
            <link>http://orc.apache.org/api/hive-storage-api</link>
            <link>http://orc.apache.org/api/orc-core</link>
            <link>http://orc.apache.org/api/orc-mapreduce</link>
            <link>http://orc.apache.org/api/orc-tools</link>
          </links>
          <offlineLinks>
            <offlineLink>
              <url>http://orc.apache.org/api/hive-storage-api</url>
              <location>${project.basedir}/../../site/api/hive-storage-api</location>
            </offlineLink>
            <offlineLink>
              <url>http://orc.apache.org/api/orc-core</url>
              <location>${project.basedir}/../../site/api/orc-core</location>
            </offlineLink>
            <offlineLink>
              <url>http://orc.apache.org/api/orc-mapreduce</url>
              <location>${project.basedir}/../../site/api/orc-mapreduce</location>
            </offlineLink>
          </offlineLinks>
          <reportOutputDirectory>${project.basedir}/../../site/api</reportOutputDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <id>setup-test-dirs</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <delete dir="${test.tmp.dir}" />
                <mkdir dir="${test.tmp.dir}" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.20.1</version>
        <configuration>
          <reuseForks>false</reuseForks>
          <argLine>-Xmx2048m</argLine>
          <environmentVariables>
            <TZ>US/Pacific</TZ>
            <LANG>en_US.UTF-8</LANG>
          </environmentVariables>
          <failIfNoTests>false</failIfNoTests>
          <systemPropertyVariables>
            <test.tmp.dir>${test.tmp.dir}</test.tmp.dir>
            <example.dir>${example.dir}</example.dir>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>3.0.3</version>
          <configuration>
            <effort>Max</effort>
            <excludeFilterFile>${basedir}/src/findbugs/exclude.xml</excludeFilterFile>
            <xmlOutput>true</xmlOutput>
            <findbugsXmlOutputDirectory>${project.build.directory}/findbugs</findbugsXmlOutputDirectory>
          </configuration>
          <executions>
            <execution>
              <id>analyze-compile</id>
              <phase>compile</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <version>0.10</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <excludeSubProject>false</excludeSubProject>
            <excludes>
              <exclude>**/data/**</exclude>
              <exclude>**/*.json</exclude>
              <exclude>**/*.json.gz</exclude>
              <exclude>**/*.orc</exclude>
              <exclude>**/*.out</exclude>
              <exclude>**/*.schema</exclude>
              <exclude>**/target/**</exclude>
              <exclude>.idea/**</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.10</version>
          <executions>
            <execution>
              <id>add-source</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>${project.build.directory}/generated-sources</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.github.os72</groupId>
          <artifactId>protoc-jar-maven-plugin</artifactId>
          <version>3.5.1.1</version>
          <executions>
            <execution>
              <phase>generate-sources</phase>
              <goals>
                <goal>run</goal>
              </goals>
              <configuration>
                 <protocArtifact>com.google.protobuf:protoc:2.5.0</protocArtifact>
                 <protocVersion>2.5.0</protocVersion>
                <addSources>none</addSources>
                <includeDirectories>
                  <include>../../proto</include>
                </includeDirectories>
                <inputDirectories>
                  <include>../../proto</include>
                </inputDirectories>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.0.0</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
              <configuration>
                <artifactSet>
                  <includes>
                    <include>com.google.protobuf:protobuf-java</include>
                    <include>org.apache.hive:hive-storage-api</include>
                  </includes>
                </artifactSet>
                <shadedArtifactAttached>true</shadedArtifactAttached>
                <shadedClassifierName>nohive</shadedClassifierName>
                <relocations>
                  <relocation>
                    <pattern>com.google.protobuf</pattern>
                    <shadedPattern>com.google.protobuf25</shadedPattern>
                  </relocation>
                  <relocation>
                    <pattern>org.apache.hadoop.hive</pattern>
                    <shadedPattern>org.apache.orc.storage</shadedPattern>
                  </relocation>
                  <relocation>
                    <pattern>org.apache.hive</pattern>
                    <shadedPattern>org.apache.orc.storage</shadedPattern>
                  </relocation>
                </relocations>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>cmake</id>
      <build>
        <directory>${build.dir}</directory>
      </build>
    </profile>
    <profile>
      <!-- a profile to check the source for common problems -->
      <id>analyze</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>findbugs-maven-plugin</artifactId>
          </plugin>
          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- a developer profile to build some benchmarks -->
      <id>benchmark</id>
      <modules>
        <module>bench</module>
      </modules>
    </profile>
  </profiles>

  <dependencyManagement>
    <dependencies>
      <!-- intra-project depedencies -->
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-shims</artifactId>
        <version>1.5.2</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-hdfs</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-core</artifactId>
        <version>1.5.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-mapreduce</artifactId>
        <version>1.5.2</version>
      </dependency>
      <dependency>
        <groupId>org.apache.orc</groupId>
        <artifactId>orc-tools</artifactId>
        <version>1.5.2</version>
      </dependency>

      <!-- inter-project depedencies -->
      <dependency>
        <groupId>com.esotericsoftware</groupId>
        <artifactId>kryo-shaded</artifactId>
        <version>3.0.3</version>
      </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>
        <version>11.0.2</version>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>2.5.0</version>
      </dependency>
      <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>3.9</version>
        <exclusions>
          <exclusion>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>1.3.1</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>io.airlift</groupId>
        <artifactId>aircompressor</artifactId>
        <version>0.10</version>
        <exclusions>
          <exclusion>
            <groupId>io.airlift</groupId>
            <artifactId>slice</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>1.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${min.hadoop.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils-core</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-daemon</groupId>
            <artifactId>commons-daemon</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-el</groupId>
            <artifactId>commons-el</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.java.dev.jets3t</groupId>
            <artifactId>jets3t</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.tukaani</groupId>
            <artifactId>xz</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-util</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
          </exclusion>
          <exclusion>
            <groupId>tomcat</groupId>
            <artifactId>jasper-compiler</artifactId>
          </exclusion>
          <exclusion>
            <groupId>tomcat</groupId>
            <artifactId>jasper-runtime</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-hdfs</artifactId>
        <version>${min.hadoop.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-daemon</groupId>
            <artifactId>commons-daemon</artifactId>
          </exclusion>
          <exclusion>
            <groupId>io.netty</groupId>
            <artifactId>netty</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.fusesource.leveldbjni</groupId>
            <artifactId>leveldbjni-all</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-util</artifactId>
          </exclusion>
          <exclusion>
            <groupId>tomcat</groupId>
            <artifactId>jasper-runtime</artifactId>
          </exclusion>
          <exclusion>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-core</artifactId>
        <version>${min.hadoop.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-util</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-storage-api</artifactId>
        <version>${storage-api.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-hdfs</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>${zookeeper.version}</version>
        <scope>runtime</scope>
        <exclusions>
          <exclusion>
            <groupId>io.netty</groupId>
            <artifactId>netty</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.codehaus.jettison</groupId>
        <artifactId>jettison</artifactId>
        <version>1.1</version>
        <exclusions>
          <exclusion>
            <groupId>stax</groupId>
            <artifactId>stax-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.5</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>1.7.5</version>
      </dependency>
      <dependency>
        <groupId>org.threeten</groupId>
        <artifactId>threetenbp</artifactId>
        <version>1.3.5</version>
      </dependency>

      <!-- test inter-project -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.mrunit</groupId>
        <artifactId>mrunit</artifactId>
        <version>1.1.0</version>
        <scope>test</scope>
        <classifier>hadoop2</classifier>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>1.9.5</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
