<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) 2014 Google, Inc.

  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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <packaging>pom</packaging>

  <groupId>com.google.cloud.bigdataoss</groupId>
  <artifactId>bigdataoss-parent</artifactId>
  <version>1.4.5</version>
  <name>BigDataOSS Parent</name>
  <description>
    Parent project for Google Cloud Platform Big-Data connectors.
  </description>

  <url>https://github.com/GoogleCloudPlatform/BigData-interop/</url>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <organization>Google Inc.</organization>
      <organizationUrl>http://www.google.com</organizationUrl>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:GoogleCloudPlatform/bigdata-interop.git</connection>
    <developerConnection>scm:git:git@github.com:GoogleCloudPlatform/bigdata-interop.git</developerConnection>
    <url>git@github.com:GoogleCloudPlatform/bigdata-interop.git</url>
  </scm>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/GoogleCloudPlatform/bigdata-interop/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <prerequisites>
    <maven>3.0.3</maven>
  </prerequisites>

  <properties>
    <bigdataoss.util.version>1.4.5</bigdataoss.util.version>
    <bigdataoss.gcsio.version>1.4.5</bigdataoss.gcsio.version>
    <bigdataoss.util-hadoop.one.version>1.4.5-hadoop1</bigdataoss.util-hadoop.one.version>
    <bigdataoss.util-hadoop.two.version>1.4.5-hadoop2</bigdataoss.util-hadoop.two.version>
    <bigdataoss.gcs.hadoop.one.version>1.4.5-hadoop1</bigdataoss.gcs.hadoop.one.version>
    <bigdataoss.gcs.hadoop.two.version>1.4.5-hadoop2</bigdataoss.gcs.hadoop.two.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <google.api.version>1.20.0</google.api.version>
    <google.guava.version>18.0</google.guava.version>
    <build.java.source.version>7</build.java.source.version>
    <build.java.target.version>7</build.java.target.version>
    <gpg.skip>true</gpg.skip>
    <hadoop.one.version>1.2.1</hadoop.one.version>
    <hadoop.two.version>2.6.0</hadoop.two.version>
    <slf4j.version>1.7.5</slf4j.version>
    <log4j.version>1.2.17</log4j.version>
    <apache.httpcomponents.version>4.0.1<!--Keep in sync with google-api-client dependency--></apache.httpcomponents.version>
  </properties>

  <profiles>
    <profile>
      <id>hadoop1</id>
      <properties>
        <hadoop.identifier>hadoop1</hadoop.identifier>
      </properties>
      <modules>
        <module>util/pom.xml</module>
        <module>gcsio/pom.xml</module>
        <module>util-hadoop/util-hadoop-hadoop1.pom.xml</module>
        <module>gcs/gcs-hadoop1.pom.xml</module>
        <module>bigquery/bigquery-hadoop1.pom.xml</module>
      </modules>
    </profile>
    <profile>
      <id>hadoop2</id>
      <properties>
        <hadoop.identifier>hadoop2</hadoop.identifier>
      </properties>
      <modules>
        <module>util/pom.xml</module>
        <module>gcsio/pom.xml</module>
        <module>util-hadoop/util-hadoop-hadoop2.pom.xml</module>
        <module>gcs/gcs-hadoop2.pom.xml</module>
        <module>bigquery/bigquery-hadoop2.pom.xml</module>
      </modules>
    </profile>
    <profile>
      <id>release</id>
      <properties>
        <gpg.skip>false</gpg.skip>
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals><goal>sign</goal></goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</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.9.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client-jackson2</artifactId>
        <version>${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client</artifactId>
        <version>${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-jackson</artifactId>
        <version>${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.http-client</groupId>
        <artifactId>google-http-client-protobuf</artifactId>
        <version>${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.api-client</groupId>
        <artifactId>google-api-client-java6</artifactId>
        <version>${google.api.version}</version>
        <exclusions>
          <exclusion>
            <!-- this version hides too many things -->
            <artifactId>guava-jdk5</artifactId>
            <groupId>com.google.guava</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-storage</artifactId>
        <version>v1-rev35-${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client</artifactId>
        <version>${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.oauth-client</groupId>
        <artifactId>google-oauth-client-java6</artifactId>
        <version>${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-bigquery</artifactId>
        <version>v2-rev217-${google.api.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.3</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <scope>compile</scope>
        <version>2.0.3</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${google.guava.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava-testlib</artifactId>
        <scope>test</scope>
        <version>${google.guava.version}</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.1</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.11</version>
        <!-- Needed for main compile and test, but not for execution -->
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>1.3</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-library</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>
      <dependency>
        <groupId>com.google.truth</groupId>
        <artifactId>truth</artifactId>
        <version>0.28</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${apache.httpcomponents.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>${apache.httpcomponents.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro</artifactId>
        <version>1.7.7</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>javax.jms</groupId>
            <artifactId>jms</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.sun.jdmk</groupId>
            <artifactId>jmxtools</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.sun.jmx</groupId>
            <artifactId>jmxri</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Hadoop 1 version specific dependencies -->
      <!-- These should only be referenced from *-hadoop1.pom.xml POMS -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-core</artifactId>
        <version>${hadoop.one.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-test</artifactId>
        <version>${hadoop.one.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Hadoop 2 version specific dependencies -->
      <!-- These should only be referenced from *-hadoop2.pom.xml POMS -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${hadoop.two.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${hadoop.two.version}</version>
        <classifier>tests</classifier>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-core</artifactId>
        <version>${hadoop.two.version}</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.5</version>
          <executions>
            <execution>
              <id>default-jar</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${build.java.source.version}</source>
          <target>${build.java.target.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.1</version>
      </plugin>
    </plugins>
  </build>
</project>
