<?xml version="1.0" encoding="UTF-8"?>
<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">
  <parent>
    <artifactId>beam-examples-parent</artifactId>
    <groupId>org.apache.beam</groupId>
    <version>2.2.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>beam-examples-java</artifactId>
  <name>Apache Beam :: Examples :: Java</name>
  <description>Apache Beam SDK provides a simple, Java-based
  interface for processing virtually any size data. This
  artifact includes all Apache Beam Java SDK examples.</description>
  <build>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
            <configuration>
              <skip>${skipDefaultIT}</skip>
              <parallel>all</parallel>
              <threadCount>4</threadCount>
              <systemPropertyVariables>
                <beamTestPipelineOptions>${integrationTestPipelineOptions}</beamTestPipelineOptions>
              </systemPropertyVariables>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <useManifestOnlyJar>false</useManifestOnlyJar>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>direct-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-direct-java</artifactId>
          <version>2.2.0</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
      <properties>
        <os.detected.name>osx</os.detected.name>
        <os.detected.classifier>osx-x86_64</os.detected.classifier>
        <os.detected.arch>x86_64</os.detected.arch>
      </properties>
    </profile>
    <profile>
      <id>apex-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-apex</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <artifactId>servlet-api</artifactId>
              <groupId>javax.servlet</groupId>
            </exclusion>
          </exclusions>
        </dependency>
        <dependency>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
          <version>4.3.5</version>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <artifactId>commons-codec</artifactId>
              <groupId>commons-codec</groupId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>flink-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-flink_2.10</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <artifactId>servlet-api</artifactId>
              <groupId>javax.servlet</groupId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>spark-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-spark</artifactId>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-sdks-java-io-hadoop-file-system</artifactId>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.spark</groupId>
          <artifactId>spark-streaming_2.10</artifactId>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.spark</groupId>
          <artifactId>spark-core_2.10</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <artifactId>jul-to-slf4j</artifactId>
              <groupId>org.slf4j</groupId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>dataflow-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>jenkins-precommit</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <id>direct-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>WordCountIT.java</include>
                    <include>WindowedWordCountIT.java</include>
                  </includes>
                  <parallel>all</parallel>
                  <threadCount>4</threadCount>
                  <systemPropertyVariables>
                    <beamTestPipelineOptions>[
                      "--project=apache-beam-testing",
                      "--tempLocation=gs://temp-storage-for-end-to-end-tests",
                      "--tempRoot=gs://temp-storage-for-end-to-end-tests",
                      "--runner=org.apache.beam.runners.direct.DirectRunner"
                      ]</beamTestPipelineOptions>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>flink-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>WordCountIT.java</include>
                    <include>WindowedWordCountIT.java</include>
                  </includes>
                  <parallel>all</parallel>
                  <threadCount>4</threadCount>
                  <systemPropertyVariables>
                    <beamTestPipelineOptions>[
                      "--project=apache-beam-testing",
                      "--tempRoot=gs://temp-storage-for-end-to-end-tests",
                      "--runner=org.apache.beam.runners.flink.TestFlinkRunner"
                      ]</beamTestPipelineOptions>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>spark-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>WordCountIT.java</include>
                  </includes>
                  <systemPropertyVariables>
                    <beamTestPipelineOptions>[
                      "--project=apache-beam-testing",
                      "--tempRoot=gs://temp-storage-for-end-to-end-tests",
                      "--runner=org.apache.beam.runners.spark.TestSparkRunner"
                      ]</beamTestPipelineOptions>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>dataflow-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>WordCountIT.java</include>
                    <include>WindowedWordCountIT.java</include>
                  </includes>
                  <parallel>all</parallel>
                  <threadCount>4</threadCount>
                  <systemPropertyVariables>
                    <beamTestPipelineOptions>[
                      "--project=apache-beam-testing",
                      "--tempRoot=gs://temp-storage-for-end-to-end-tests",
                      "--runner=TestDataflowRunner"
                      ]</beamTestPipelineOptions>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>dataflow-runner-integration-tests-streaming</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>WordCountIT.java</include>
                    <include>WindowedWordCountIT.java</include>
                  </includes>
                  <parallel>all</parallel>
                  <threadCount>4</threadCount>
                  <systemPropertyVariables>
                    <beamTestPipelineOptions>[
                      "--project=apache-beam-testing",
                      "--tempRoot=gs://temp-storage-for-end-to-end-tests",
                      "--runner=TestDataflowRunner",
                      "--streaming=true"
                      ]</beamTestPipelineOptions>
                  </systemPropertyVariables>
                </configuration>
              </execution>
              <execution>
                <id>apex-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
                    <include>WordCountIT.java</include>
                    <include>WindowedWordCountIT.java</include>
                  </includes>
                  <parallel>none</parallel>
                  <threadCount>4</threadCount>
                  <systemPropertyVariables>
                    <beamTestPipelineOptions>[
                      "--project=apache-beam-testing",
                      "--tempRoot=gs://temp-storage-for-end-to-end-tests",
                      "--runner=org.apache.beam.runners.apex.TestApexRunner"
                      ]</beamTestPipelineOptions>
                  </systemPropertyVariables>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <useManifestOnlyJar>false</useManifestOnlyJar>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>com.esotericsoftware.kryo</groupId>
          <artifactId>kryo</artifactId>
          <version>${apex.kryo.version}</version>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
      <properties>
        <skipDefaultIT>true</skipDefaultIT>
        <skipITs>false</skipITs>
      </properties>
    </profile>
    <profile>
      <id>disable-streaming-ITs</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <excludedGroups>org.apache.beam.sdk.testing.StreamingIT</excludedGroups>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-core</artifactId>
      <version>2.2.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-extensions-google-cloud-platform-core</artifactId>
      <version>2.2.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
      <version>2.2.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.api-client</groupId>
      <artifactId>google-api-client</artifactId>
      <version>1.22.0</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava-jdk5</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-bigquery</artifactId>
      <version>v2-rev355-1.22.0</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava-jdk5</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.http-client</groupId>
      <artifactId>google-http-client</artifactId>
      <version>1.22.0</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava-jdk5</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.cloud.bigdataoss</groupId>
      <artifactId>util</artifactId>
      <version>1.4.5</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.auth</groupId>
      <artifactId>google-auth-library-oauth2-http</artifactId>
      <version>0.7.1</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava-jdk5</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.auth</groupId>
      <artifactId>google-auth-library-credentials</artifactId>
      <version>0.7.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>1.8.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.apis</groupId>
      <artifactId>google-api-services-pubsub</artifactId>
      <version>v1-rev10-1.22.0</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava-jdk5</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.google.cloud.datastore</groupId>
      <artifactId>datastore-v1-proto-client</artifactId>
      <version>1.4.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.cloud.datastore</groupId>
      <artifactId>datastore-v1-protos</artifactId>
      <version>1.3.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.25</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.7.25</version>
      <scope>runtime</scope>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-runners-direct-java</artifactId>
      <version>2.2.0</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
      <version>2.2.0</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

