<?xml version="1.0" encoding="UTF-8"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Copyright (C) 2017 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 SDK for Java - Parent</name>
  <description>Google Cloud Dataflow SDK for Java is a distribution of Apache
      Beam designed to simplify usage of Apache Beam on Google Cloud Dataflow
      service. This artifact includes the parent POM for other Dataflow SDK
      artifacts.</description>
  <url>http://cloud.google.com/dataflow</url>
  <inceptionYear>2013</inceptionYear>

  <version>2.2.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>
    <tag>v-RC1</tag>
  </scm>

  <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>

  <repositories>
    <repository>
      <id>apache.staging</id>
      <name>Apache Software Foundation Staging Repository</name>
      <url>https://repository.apache.org/content/repositories/staging/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

    <repository>
      <id>apache.snapshots</id>
      <name>Apache Software Foundation Snapshot Repository</name>
      <url>https://repository.apache.org/content/repositories/snapshots/</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <prerequisites>
    <maven>3.2</maven>
  </prerequisites>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <timestamp>${maven.build.timestamp}</timestamp>
    <maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

    <beam.version>2.2.0</beam.version>

    <dataflow.release_name>Google Cloud Dataflow SDK for Java</dataflow.release_name>
    <dataflow.container_version>${project.version}</dataflow.container_version>
    <dataflow.legacy_environment_major_version>6</dataflow.legacy_environment_major_version>
    <dataflow.fnapi_environment_major_version>1</dataflow.fnapi_environment_major_version>

    <bigquery.version>v2-rev355-1.22.0</bigquery.version>
    <google-clients.version>1.22.0</google-clients.version>
    <guava.version>20.0</guava.version>
    <hamcrest.version>1.3</hamcrest.version>
    <joda.version>2.4</joda.version>
    <junit.version>4.12</junit.version>
    <mockito.version>1.9.5</mockito.version>
    <pubsub.version>v1-rev10-1.22.0</pubsub.version>
    <slf4j.version>1.7.25</slf4j.version>

    <surefire-plugin.version>2.20</surefire-plugin.version>
    <maven-compiler-plugin.version>3.6.2</maven-compiler-plugin.version>
    <maven-exec-plugin.version>1.6.0</maven-exec-plugin.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
    <maven-shade-plugin.version>3.0.0</maven-shade-plugin.version>
  </properties>

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

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
          <executions>
            <execution>
              <id>enforce-java</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <!--
                    Require Java 8 and above to build the distribution. Note
                    that this is a requirement on process to build the
                    distribution only. It is expected for the build to fail
                    using Java 7, but the output is still required to work on
                    Java 7.
                  -->
                  <requireJavaVersion>
                    <version>[1.8.0,)</version>
                  </requireJavaVersion>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.2</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
            <compilerArgs>
              <arg>-Xlint:all</arg>
              <arg>-Werror</arg>
              <arg>-Xlint:-options</arg>
              <!-- Ignore warnings for annotations which aren't consumed by annotation processors. -->
              <arg>-Xlint:-processing</arg>
            </compilerArgs>
            <showWarnings>true</showWarnings>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>6.19</version>
            </dependency>
            <dependency>
              <groupId>org.apache.beam</groupId>
              <artifactId>beam-sdks-java-build-tools</artifactId>
              <version>${beam.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <configLocation>beam/checkstyle.xml</configLocation>
            <suppressionsLocation>sdk/suppressions.xml</suppressionsLocation>
            <consoleOutput>true</consoleOutput>
            <failOnViolation>true</failOnViolation>
            <includeResources>false</includeResources>
            <includeTestSourceDirectory>true</includeTestSourceDirectory>
          </configuration>
          <executions>
            <!--
              Execute checkstyle after compilation but before tests.
              This ensures that any parsing or type checking errors are from
              javac, so they look as expected. Beyond that, we want to
              fail as early as possible.
            -->
            <execution>
              <phase>test-compile</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
          <configuration>
            <skipIfEmpty>true</skipIfEmpty>
          </configuration>
          <executions>
            <execution>
              <id>default-jar</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
            <execution>
              <id>default-test-jar</id>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>compile</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
            <execution>
              <id>attach-test-sources</id>
              <phase>test-compile</phase>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <configuration>
            <failOnError>false</failOnError>
          </configuration>
          <executions>
            <execution>
              <id>javadoc</id>
              <phase>package</phase>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.0.0</version>
          <executions>
            <execution>
              <goals>
                <goal>analyze-only</goal>
              </goals>
              <configuration>
                <failOnWarning>true</failOnWarning>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-archetype-plugin</artifactId>
          <version>2.4</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.shared</groupId>
              <artifactId>maven-invoker</artifactId>
              <version>2.2</version>
            </dependency>
          </dependencies>
          <executions>
            <!-- archetype-packaging above binds this plugin's goals as follows:
                     archetype:jar to the package phase,
                     archetype:integration-test to the integration-test phase,
                     archetype:update-local-catalog to the install phase.
                 We defer the integration-test goal to the install phase, since
                 this test actually depends on the core SDK to be installed. -->
            <execution>
              <id>default-integration-test</id>
              <phase>install</phase>
              <goals>
                <goal>integration-test</goal>
              </goals>
              <configuration>
                <ignoreEOLStyle>true</ignoreEOLStyle>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
          <configuration>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>true</useReleaseProfile>
            <goals>deploy</goals>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.5.0</version>
          <configuration>
            <cleanupDaemonThreads>false</cleanupDaemonThreads>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>

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

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.cloud.dataflow</groupId>
        <artifactId>google-cloud-dataflow-java-sdk-all</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-sdks-java-core</artifactId>
        <version>${beam.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
        <version>${beam.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-runners-direct-java</artifactId>
        <version>${beam.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
        <version>${beam.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-examples-java</artifactId>
        <version>${beam.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.beam</groupId>
        <artifactId>beam-examples-java8</artifactId>
        <version>${beam.version}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
</project>
