<commit_before><?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You 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>org.apache.beam</groupId>
    <artifactId>beam-examples-parent</artifactId>
    <version>2.2.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

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

  <packaging>jar</packaging>

  <profiles>

    <!--
      The direct runner is available by default.
      You can also include it on the classpath explicitly with -P direct-runner
    -->
    <profile>
      <id>direct-runner</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-direct-java</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Apache Apex runner with -P apex-runner -->
    <profile>
      <id>apex-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-apex</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <groupId>javax.servlet</groupId>
              <artifactId>servlet-api</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
        <!--
          Apex depends on httpclient version 4.3.5, project has a transitive dependency to httpclient 4.0.1 from
          google-http-client. Apex dependency version being specified explicitly so that it gets picked up. This
          can be removed when the project no longer has a dependency on a different httpclient version.
        -->
        <dependency>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
          <version>4.3.5</version>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <groupId>commons-codec</groupId>
              <artifactId>commons-codec</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Apache Flink runner with -P flink-runner -->
    <profile>
      <id>flink-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-flink_2.10</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <groupId>javax.servlet</groupId>
              <artifactId>servlet-api</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Apache Spark runner -P spark-runner -->
    <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>
              <groupId>org.slf4j</groupId>
              <artifactId>jul-to-slf4j</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Google Cloud Dataflow runner -P dataflow-runner -->
    <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>

    <!-- Custom set up for our Jenkins precommit tests that comment on GitHub -->
    <profile>
      <id>jenkins-precommit</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <skipITs>false</skipITs>
        <skipDefaultIT>true</skipDefaultIT>
      </properties>

      <dependencies>
        <!--
          This profile requires -P apex-runner and -P spark-runner already. When they are both
          included, the Spark runner's Kryo dependency will pull in a version that is insufficiently
          recent for the Apex runner.

          This dependency makes the Apex runner version "closer" by Maven resolution rules,
          so it will not be overridden.
        -->
        <dependency>
          <groupId>com.esotericsoftware.kryo</groupId>
          <artifactId>kryo</artifactId>
          <version>${apex.kryo.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-gearpump</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <useManifestOnlyJar>false</useManifestOnlyJar>
            </configuration>
            <executions>
              <execution>
                <id>direct-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes><commit_msg>Override maven-enforcer-plugin for precommit tests<commit_after><?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You 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>org.apache.beam</groupId>
    <artifactId>beam-examples-parent</artifactId>
    <version>2.2.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

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

  <packaging>jar</packaging>

  <profiles>

    <!--
      The direct runner is available by default.
      You can also include it on the classpath explicitly with -P direct-runner
    -->
    <profile>
      <id>direct-runner</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-direct-java</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Apache Apex runner with -P apex-runner -->
    <profile>
      <id>apex-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-apex</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <groupId>javax.servlet</groupId>
              <artifactId>servlet-api</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
        <!--
          Apex depends on httpclient version 4.3.5, project has a transitive dependency to httpclient 4.0.1 from
          google-http-client. Apex dependency version being specified explicitly so that it gets picked up. This
          can be removed when the project no longer has a dependency on a different httpclient version.
        -->
        <dependency>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
          <version>4.3.5</version>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <groupId>commons-codec</groupId>
              <artifactId>commons-codec</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Apache Flink runner with -P flink-runner -->
    <profile>
      <id>flink-runner</id>
      <dependencies>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-flink_2.10</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <groupId>javax.servlet</groupId>
              <artifactId>servlet-api</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Apache Spark runner -P spark-runner -->
    <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>
              <groupId>org.slf4j</groupId>
              <artifactId>jul-to-slf4j</artifactId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
    </profile>

    <!-- Include the Google Cloud Dataflow runner -P dataflow-runner -->
    <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>

    <!-- Custom set up for our Jenkins precommit tests that comment on GitHub -->
    <profile>
      <id>jenkins-precommit</id>
      <activation>
        <jdk>[1.8,)</jdk>
      </activation>
      <properties>
        <skipITs>false</skipITs>
        <skipDefaultIT>true</skipDefaultIT>
      </properties>

      <dependencies>
        <!--
          This profile requires -P apex-runner and -P spark-runner already. When they are both
          included, the Spark runner's Kryo dependency will pull in a version that is insufficiently
          recent for the Apex runner.

          This dependency makes the Apex runner version "closer" by Maven resolution rules,
          so it will not be overridden.
        -->
        <dependency>
          <groupId>com.esotericsoftware.kryo</groupId>
          <artifactId>kryo</artifactId>
          <version>${apex.kryo.version}</version>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.beam</groupId>
          <artifactId>beam-runners-gearpump</artifactId>
          <scope>runtime</scope>
        </dependency>
      </dependencies>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <enforceBytecodeVersion>
                      <maxJdkVersion>1.8</maxJdkVersion>
                    </enforceBytecodeVersion>
                    <requireJavaVersion>
                      <version>[1.8,)</version>
                    </requireJavaVersion>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <useManifestOnlyJar>false</useManifestOnlyJar>
            </configuration>
            <executions>
              <execution>
                <id>direct-runner-integration-tests</id>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
                <configuration>
                  <includes>
{'fraction_non_alphanumeric': 0.11547344110854503, 'fraction_numerical': 0.0067304519960409105, 'mean_word_length': 2.0251497005988024, 'pattern_counts': {'":': 0, '<': 487, '<?xml version=': 2, '>': 487, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3909642', 'n_tokens_mistral': 4522, 'n_tokens_neox': 4008, 'n_words': 927}