<?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.5.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>v2.5.0</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>
    <java.version>1.8</java.version>

    <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.5.0</beam.version>

    <dataflow.release_name>Google Cloud Dataflow SDK for Java</dataflow.release_name>
    <dataflow.container_version>beam-${beam.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-rev374-1.23.0</bigquery.version>
    <checkstyle.version>8.7</checkstyle.version>
    <eclipse-m2e.version>1.0.0</eclipse-m2e.version>
    <google-clients.version>1.23.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>
    <kafka.clients.version>1.0.0</kafka.clients.version>
    <mockito.version>1.9.5</mockito.version>
    <pubsub.version>v1-rev382-1.23.0</pubsub.version>
    <slf4j.version>1.7.25</slf4j.version>

    <archetype-packaging.version>2.4</archetype-packaging.version>
    <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
    <surefire-plugin.version>2.20.1</surefire-plugin.version>
    <maven-archetype-plugin.version>2.4</maven-archetype-plugin.version>
    <maven-checkstyle-plugin.version>3.0.0</maven-checkstyle-plugin.version>
    <maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
    <maven-compiler-plugin.version>3.7.0</maven-compiler-plugin.version>
    <maven-dependency-plugin.version>3.1.1</maven-dependency-plugin.version>
    <maven-invoker.version>2.2</maven-invoker.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
    <maven-javadoc-plugin.version>3.0.0-M1</maven-javadoc-plugin.version>
    <maven-release-plugin>2.5.3</maven-release-plugin>
    <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
    <maven-shade-plugin.version>3.1.0</maven-shade-plugin.version>
    <maven-surefire-plugin.version>2.21.0</maven-surefire-plugin.version>
    <maven-source-plugin.version>3.0.1</maven-source-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-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</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>${maven-checkstyle-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${checkstyle.version}</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>${maven-jar-plugin.version}</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>${maven-source-plugin.version}</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>${maven-javadoc-plugin.version}</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>${maven-resources-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin.version}</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>${maven-surefire-plugin.version}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-archetype-plugin</artifactId>
          <version>${maven-archetype-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>org.apache.maven.shared</groupId>
              <artifactId>maven-invoker</artifactId>
              <version>${maven-invoker.version}</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>${maven-release-plugin}</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>${exec-maven-plugin.version}</version>
          <configuration>
            <cleanupDaemonThreads>false</cleanupDaemonThreads>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <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-sdks-java-io-kafka</artifactId>
        <version>${beam.version}</version>
      </dependency>

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