<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.cloudera.cdh</groupId>
    <artifactId>cdh-root</artifactId>
    <version>5.13.3</version>
    <relativePath /><!-- no parent resolution -->
  </parent>

  <groupId>com.twitter</groupId>
  <artifactId>parquet</artifactId>
  <version>1.5.0-cdh5.13.3</version>
  <packaging>pom</packaging>

  <name>Apache Parquet MR</name>
  <url>https://parquet.apache.org</url>
  <description>Parquet is a columnar storage format that supports nested data. This provides the java implementation.</description>

  <scm>
    <connection>scm:git:git@github.com:apache/parquet-mr.git</connection>
    <url>scm:git:git@github.com:apache/parquet-mr.git</url>
    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/parquet-mr.git</developerConnection>
  </scm>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.apache.org/jira/browse/PARQUET</url>
  </issueManagement>

  <mailingLists>
    <mailingList>
      <name>Dev Mailing List</name>
      <post>dev@parquet.apache.org</post>
      <subscribe>dev-subscribe@parquet.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@parquet.apache.org</unsubscribe>
    </mailingList>
    <mailingList>
      <name>Commits Mailing List</name>
      <post>commits@parquet.apache.org</post>
      <subscribe>commits-subscribe@parquet.apache.org</subscribe>
      <unsubscribe>commits-unsubscribe@parquet.apache.org</unsubscribe>
    </mailingList>
  </mailingLists>

  <developers>
    <developer>
      <name>Julien Le Dem</name>
      <email>julien@twitter.com</email>
    </developer>
  </developers>

  

  <!-- this is needed for maven-thrift-plugin, would like to remove this.
   see: https://issues.apache.org/jira/browse/THRIFT-1536  -->
  

  <properties>
    <javaVersion>1.7</javaVersion>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <github.global.server>github</github.global.server>
    <maven-jar-plugin.version>2.4</maven-jar-plugin.version>
    <jackson.groupId>org.codehaus.jackson</jackson.groupId>
    <jackson.version>${cdh.jackson.version}</jackson.version>
    <jackson.package>org.codehaus.jackson</jackson.package>
    <shade.prefix>shaded.parquet</shade.prefix>
    <hadoop.version>${cdh.hadoop.version}</hadoop.version>
    <cascading.version>2.5.3</cascading.version>
    <parquet.format.version>${cdh.parquet-format.version}</parquet.format.version>
    <log4j.version>1.2.17</log4j.version>
    <previous.version>1.5.0-cdh5.2.0</previous.version>
    <thrift.executable>thrift</thrift.executable>
    <protoc.executable>protoc</protoc.executable>
    <pig.version>${cdh.pig.version}</pig.version>
    <thrift.version>${cdh.thrift.version}</thrift.version>
    <protobuf.version>${cdh.protobuf.version}</protobuf.version>
    <avro.version>${cdh.avro.version}</avro.version>
    <scala.maven.test.skip>false</scala.maven.test.skip>
    <scala.version>2.10.4</scala.version>
    <!-- scala.binary.version is used for projects that fetch dependencies that are in scala -->
    <scala.binary.version>2.10</scala.binary.version>
    <fastutil.version>7.2.1</fastutil.version>
    <semver.api.version>0.9.33</semver.api.version>
    <compat.skip>false</compat.skip>
  </properties>

  <modules>
    <module>parquet-avro</module>
    <!-- Added in backports
    <module>parquet-benchmarks</module>
    -->
    <module>parquet-cascading</module>
    <module>parquet-column</module>
    <module>parquet-common</module>
    <module>parquet-encoding</module>
    <module>parquet-generator</module>
    <module>parquet-hadoop</module>
    <module>parquet-jackson</module>
    <module>parquet-pig</module>
    <module>parquet-pig-bundle</module>
    <module>parquet-protobuf</module>
    <module>parquet-scala</module>
    <module>parquet-scrooge</module>
    <module>parquet-thrift</module>
    <module>parquet-test-hadoop2</module>
    <module>parquet-hadoop-bundle</module>
    <!-- see README.CLOUDERA
    <module>parquet-hive</module>
    <module>parquet-hive-bundle</module>
    -->
    <module>parquet-tools</module>
  </modules>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.10</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>3.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.0.1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet><!-- by default, id = "default" -->
            <reports><!-- select non-aggregate reports -->
              <report>javadoc</report>
              <report>test-javadoc</report>
            </reports>
          </reportSet>
          <reportSet><!-- aggregate reportSet, to define in poms having modules -->
            <id>aggregate</id>
            <inherited>false</inherited><!-- don't run aggregate in child modules -->
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.2</version>
        <configuration>
          <formats>
            <format>html</format>
          </formats>
          <aggregate>true</aggregate>
          <instrumentation>
            <ignores>
              <ignore>parquet.Log.*</ignore>
              <ignore>java.lang.UnsupportedOperationException.*</ignore>
            </ignores>
            <excludes>
              <exclude>parquet/Log.class</exclude>
              <exclude>**/*Exception.class</exclude>
              <exclude>parquet/example/**/*.class</exclude>
            </excludes>
          </instrumentation>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.3.1</version>
          <dependencies>
            <dependency>
              <groupId>org.semver</groupId>
              <artifactId>enforcer-rule</artifactId>
              <version>0.9.27</version>
            </dependency>
          </dependencies>
          <configuration>
            <rules>
              <requireJavaVersion>
                <version>[${javaVersion}.0,${javaVersion}.1000}]</version>
              </requireJavaVersion>
            </rules>
          </configuration>
          <executions>
            <execution>
              <id>clean</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <phase>pre-clean</phase>
            </execution>
            <execution>
              <id>default</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <phase>validate</phase>
            </execution>
            <execution>
              <id>site</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <phase>pre-site</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.github.siom79.japicmp</groupId>
          <artifactId>japicmp-maven-plugin</artifactId>
          <version>0.5.3</version>
          <configuration>
            <oldVersion>
              <dependency>
                <groupId>com.twitter</groupId>
                <artifactId>${project.artifactId}</artifactId>
                <version>${previous.version}</version>
              </dependency>
            </oldVersion>
            <newVersion>
              <file>
                <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
              </file>
            </newVersion>
            <parameter>
              <onlyModified>true</onlyModified>
              <includes>
                <include>parquet</include>
              </includes>
              <excludes>
                <exclude>parquet.column</exclude>
                <exclude>parquet.filter2</exclude>
                <exclude>parquet.hadoop.metadata.ColumnPath</exclude> <!-- moved to parquet-common -->
                <exclude>parquet.hadoop.metadata.Canonicalizer</exclude> <!-- moved to parquet-common -->
                <exclude>parquet.hadoop.ParquetInputSplit</exclude>
                <exclude>parquet.hadoop.ParquetInputFormat#getReadSupport(org.apache.hadoop.conf.Configuration)</exclude> <!-- not public API -->
                <exclude>parquet.io.api.Binary#Binary()</exclude>
                <exclude>parquet.schema.Types\$PrimitiveBuilder</exclude> <!-- methods moved to superclass -->
                <exclude>parquet.schema.Types\$GroupBuilder</exclude> <!-- methods moved to superclass -->
                <exclude>parquet.io.ColumnIOFactory\$ColumnIOCreatorVisitor</exclude> <!-- not public API -->
                <exclude>parquet.thrift.projection</exclude>
                <exclude>parquet.thrift.ThriftSchemaConverter#toStructType(java.lang.Class)</exclude> <!-- not public API -->
                <exclude>parquet.thrift.ThriftSchemaConvertVisitor</exclude> <!-- not public API -->
                <exclude>parquet.it.unimi.dsi</exclude> <!-- shaded fastutil from old shading pattern -->
                <exclude>parquet.${jackson.package}</exclude> <!-- shaded jackson from old shading pattern-->
                <exclude>shaded</exclude> <!-- current shading pattern -->
              </excludes>
              <!-- <accessModifier>public</accessModifier> -->
              <breakBuildOnModifications>false</breakBuildOnModifications>
              <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
              <onlyBinaryIncompatible>true</onlyBinaryIncompatible>
              <includeSynthetic>false</includeSynthetic>
              <ignoreMissingClasses>false</ignoreMissingClasses>
              <skipPomModules>true</skipPomModules>
            </parameter>
            <dependencies>
              <!--
              <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-math3</artifactId>
                <version>3.4</version>
              </dependency>
              -->
            </dependencies>
            <skip>${compat.skip}</skip>
          </configuration>
          <executions>
            <execution>
              <phase>verify</phase>
              <goals>
                <goal>cmp</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-release-plugin</artifactId>
         <version>2.1</version>
         <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <useReleaseProfile>false</useReleaseProfile>
          <arguments>-Psonatype-oss-release</arguments>
         </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.1</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
              <configuration>
                <minimizeJar>true</minimizeJar>
                <artifactSet>
                  <includes>
                    <include>${jackson.groupId}:*</include>
                    <include>it.unimi.dsi:fastutil</include>
                  </includes>
                </artifactSet>
                <!-- Shade jackson but do not include any class. Let parquet-jackson handle this -->
                <filters>
                  <filter>
                    <artifact>${jackson.groupId}:*</artifact>
                    <excludes>
                      <exclude>**</exclude>
                    </excludes>
                  </filter>
                </filters>
                <relocations>
                  <relocation>
                    <pattern>${jackson.package}</pattern>
                    <shadedPattern>${shade.prefix}.${jackson.package}</shadedPattern>
                  </relocation>
                  <relocation>
                    <pattern>it.unimi.dsi</pattern>
                    <shadedPattern>${shade.prefix}.it.unimi.dsi</shadedPattern>
                  </relocation>
                </relocations>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
          <configuration>
            <archive>
              <manifestEntries>
                <git-SHA-1>${buildNumber}</git-SHA-1>
              </manifestEntries>
            </archive>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.10.b1</version>
        <configuration>
          <header>src/license.txt</header>
          <strictCheck>true</strictCheck>
        </configuration>
        <!--executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions-->
      </plugin>
      <plugin>
        <!-- Override source and target from the ASF parent -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <argLine>-XX:MaxPermSize=256m</argLine>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <argLine>-Xmx512m</argLine>
          <excludes>
            <exclude>**/benchmark/*.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
         </execution>
       </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.7</version>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>generate-jdiff-xml</id>
            <phase>site</phase>
            <goals>
              <goal>aggregate</goal>
            </goals>
            <configuration>
              <doclet>jdiff.JDiff</doclet>
              <docletPath>${project.basedir}/lib/jdiff.jar</docletPath>
              <additionalparam>
                -XDignore.symbol.file -apiname 'Parquet-MR ${project.version}'
              </additionalparam>
              <useStandardDocletOptions>false</useStandardDocletOptions>
              <reportOutputDirectory>${project.reporting.outputDirectory}</reportOutputDirectory>
              <destDir>jdiff</destDir>
              <excludePackageNames>parquet.jackson.*:org.apache.*</excludePackageNames>
            </configuration>
          </execution>
          <execution>
            <id>generate-jdiff-site-report</id>
            <phase>site</phase>
            <goals>
              <goal>aggregate</goal>
            </goals>
            <configuration>
              <doclet>jdiff.JDiff</doclet>
              <docletPath>${project.basedir}/lib/jdiff.jar:${project.basedir}/lib/xerces.jar</docletPath>
              <additionalparam>
                -XDignore.symbol.file -oldapi 'Parquet-MR ${previous.version}' -newapi 'Parquet-MR ${project.version}' -oldapidir '${project.basedir}/src/jdiff' -newapidir '${project.reporting.outputDirectory}/jdiff' -javadocnew ../../apidocs/ -d ${project.reporting.outputDirectory}/jdiff
              </additionalparam>
              <useStandardDocletOptions>false</useStandardDocletOptions>
              <reportOutputDirectory>${project.reporting.outputDirectory}</reportOutputDirectory>
              <destDir>jdiff</destDir>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>mr1</id>
      <properties>
        <hadoop.version>${cdh.mr1.version}</hadoop.version>
      </properties>
    </profile>
    <profile>
      <id>update-github-site</id>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-project-info-reports-plugin</artifactId>
            <version>2.7</version>
            <reportSets>
              <reportSet>
                <reports>
                  <report>index</report>
                  <report>mailing-list</report>
                  <report>dependency-info</report>
                  <report>project-team</report>
                  <report>dependencies</report>
                  <report>license</report>
                  <report>scm</report>
                </reports>
              </reportSet>
            </reportSets>
          </plugin>
        </plugins>
      </reporting>
      <distributionManagement>
        <site>
          <id>github-pages-site</id>
          <name>Deployment through GitHub's site deployment plugin</name>
          <url>site/${project.version}</url>
        </site>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-site-plugin</artifactId>
            <version>3.3</version>
            <configuration>
              <skipDeploy>true</skipDeploy>
            </configuration>
          </plugin>
          <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>0.8</version>
            <configuration>
              <message>Creating site for ${project.version}</message>
              <path>${project.distributionManagement.site.url}</path>
              <merge>true</merge>
            </configuration>
            <executions>
              <execution>
                <id>github-site</id>
                <goals>
                  <goal>site</goal>
                </goals>
                <phase>site-deploy</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <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-javadoc-plugin</artifactId>
            <version>2.7</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
