<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Copyright (C) 2015 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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.google</groupId>
    <artifactId>google</artifactId>
    <version>5</version>
  </parent>

  <groupId>com.google.cloud.dataflow</groupId>
  <artifactId>google-cloud-dataflow-java-sdk-parent</artifactId>
  <name>Google Cloud Dataflow Java SDK - Parent</name>
  <description>Google Cloud Dataflow Java SDK provides a simple, Java-based
    interface for processing virtually any size data using Google cloud
    resources. This artifact includes the parent POM for other Dataflow
    artifacts.</description>
  <url>http://cloud.google.com/dataflow</url>
  <inceptionYear>2013</inceptionYear>

  <version>1.7.0</version>

  <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/DataflowJavaSDK.git</connection>
    <developerConnection>scm:git:git@github.com:GoogleCloudPlatform/DataflowJavaSDK.git</developerConnection>
    <url>git@github.com:GoogleCloudPlatform/DataflowJavaSDK.git</url>
  </scm>

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

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <dataflow.javadoc_opts></dataflow.javadoc_opts>
    <dataflow.surefire_argline></dataflow.surefire_argline>

    <!-- If updating dependencies, please update any relevant javadoc offlineLinks -->
    <avro.version>1.7.7</avro.version>
    <bigquery.version>v2-rev295-1.22.0</bigquery.version>
    <pubsubgrpc.version>0.0.2</pubsubgrpc.version>
    <bigtable.version>0.3.0</bigtable.version>
    <clouddebugger.version>v2-rev8-1.22.0</clouddebugger.version>
    <dataflow.version>v1b3-rev36-1.22.0</dataflow.version>
    <dataflow.proto.version>0.5.160222</dataflow.proto.version>
    <datastore.version>v1beta2-rev1-4.0.0</datastore.version>
    <datastore.client.version>1.1.0</datastore.client.version>
    <datastore.proto.version>1.0.1</datastore.proto.version>
    <google-clients.version>1.22.0</google-clients.version>
    <grpc.version>0.13.1</grpc.version>
    <guava.version>19.0</guava.version>
    <hamcrest.version>1.3</hamcrest.version>
    <jackson.version>2.7.0</jackson.version>
    <joda.version>2.4</joda.version>
    <jsr305.version>3.0.1</jsr305.version>
    <junit.version>4.11</junit.version>
    <protobuf.version>3.0.0-beta-1</protobuf.version>
    <pubsub.version>v1-rev10-1.22.0</pubsub.version>
    <slf4j.version>1.7.14</slf4j.version>
    <stax2.version>3.1.4</stax2.version>
    <storage.version>v1-rev71-1.22.0</storage.version>
    <woodstox.version>4.4.1</woodstox.version>
  </properties>

  <packaging>pom</packaging>
  <modules>
    <module>sdk</module>
    <module>examples</module>
    <module>maven-archetypes/starter</module>
    <module>maven-archetypes/examples</module>
  </modules>

  <profiles>
    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <dataflow.javadoc_opts>-Xdoclint:-missing</dataflow.javadoc_opts>
      </properties>
    </profile>
  </profiles>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.1</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
            <compilerArgs>
              <arg>-Xlint:all</arg>
              <arg>-Werror</arg>
              <!-- Override options warnings to support cross-compilation -->
              <arg>-Xlint:-options</arg>
              <!-- Temporary lint overrides, to be removed over time. -->
              <arg>-Xlint:-cast</arg>
              <arg>-Xlint:-deprecation</arg>
              <arg>-Xlint:-processing</arg>
              <arg>-Xlint:-rawtypes</arg>
              <arg>-Xlint:-serial</arg>
              <arg>-Xlint:-try</arg>
              <arg>-Xlint:-unchecked</arg>
              <arg>-Xlint:-varargs</arg>
              <!-- Uncomment the following args to display more warnings.  -->
              <!-- -Xmaxwarns -->
              <!-- 10000 -->
            </compilerArgs>
            <showWarnings>true</showWarnings>
            <!-- Another temp override, to be set to true in due course. -->
            <showDeprecation>false</showDeprecation>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.5</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.3</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>2.1</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.4.0</version>
          <executions>
            <execution>
              <phase>verify</phase>
              <goals>
                <goal>java</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <cleanupDaemonThreads>false</cleanupDaemonThreads>
            <systemProperties>
              <systemProperty>
                <key>java.util.logging.config.file</key>
                <value>logging.properties</value>
              </systemProperty>
            </systemProperties>
          </configuration>
        </plugin>

        <!-- Coverage analysis for tests -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.7.5.201505241946</version>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <output>file</output>
                <dumpOnExit>true</dumpOnExit>
              </configuration>
            </execution>
            <execution>
              <id>report</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <excludes>
              <exclude>**/AutoValue_*.class</exclude>
            </excludes>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.18.1</version>
          <configuration>
            <parallel>${testParallelValue}</parallel>
            <threadCount>4</threadCount>
            <additionalClasspathElements>
              <additionalClasspathElement>${project.build.directory}/${project.artifactId}-${project.version}.jar</additionalClasspathElement>
              <additionalClasspathElement>${project.build.directory}/${project.artifactId}-${project.version}-tests.jar</additionalClasspathElement>
            </additionalClasspathElements>
            <groups>${testGroups}</groups>
            <systemPropertyVariables>
              <runIntegrationTestOnService>${runIntegrationTestOnService}</runIntegrationTestOnService>
              <projectName>${dataflowProjectName}</projectName>
            </systemPropertyVariables>
            <useManifestOnlyJar>false</useManifestOnlyJar>
            <trimStackTrace>false</trimStackTrace>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
            <argLine>${dataflow.surefire_argline}</argLine>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.surefire</groupId>
              <artifactId>surefire-junit47</artifactId>
              <version>2.18.1</version>
            </dependency>
          </dependencies>
        </plugin>

        <!-- This plugin's configuration tells the m2e plugin how to import this
             Maven project into the Eclipse environment. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.avro</groupId>
                    <artifactId>avro-maven-plugin</artifactId>
                    <versionRange>${avro.version}</versionRange>
                    <goals>
                      <goal>schema</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                    </execute>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <versionRange>[2.5,)</versionRange>
                    <goals>
                      <goal>jar</goal>
                      <goal>test-jar</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <versionRange>[0.7.5,)</versionRange>
                    <goals>
                      <goal>report</goal>
                      <goal>prepare-agent</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

        <!-- Ignore runtime-only dependencies in analysis -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
          <configuration>
            <ignoreNonCompile>true</ignoreNonCompile>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.10</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.1</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependency-updates-report</report>
              <report>plugin-updates-report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>
