<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-sdks-java-io-parent</artifactId>
    <version>2.3.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>beam-sdks-java-io-jdbc</artifactId>
  <name>Apache Beam :: SDKs :: Java :: IO :: JDBC</name>
  <description>IO to read and write on JDBC datasource.</description>

  <!--
      The dataflow-runner and spark-runner profiles support using those runners during an integration test. These are
      not the long-term way we want to support using runners in ITs (e.g. it is annoying to add to all IO modules.)
      We cannot create a dependency IO -> Runners since the runners depend on IO (e.g. kafka depends on spark.)
  -->

  <profiles>
    <!-- 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.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>

    <!--
        This profile invokes PerfKitBenchmarker, which does benchmarking of
        the IO ITs. The arguments passed to it allow it to invoke mvn again
        with the desired benchmark.

        To invoke this, run:

        mvn verify -Dio-it-suite -pl sdks/java/io/jdbc
            -DpkbLocation="path-to-pkb.py" \
            -DintegrationTestPipelineOptions='["-tempRoot=gs://bucket/staging"]'
    -->
    <profile>
      <id>io-it-suite</id>
      <activation>
        <property><name>io-it-suite</name></property>
      </activation>
      <properties>
      <!-- This is based on the location of the current pom relative to the root
           See discussion in BEAM-2460 -->
        <beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>groovy-maven-plugin</artifactId>
            <version>${groovy-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>find-supported-python-for-compile</id>
                <phase>initialize</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <source>${beamRootProjectDir}/sdks/python/findSupportedPython.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${maven-exec-plugin.version}</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>${python.interpreter.bin}</executable>
              <arguments>
                <argument>${pkbLocation}</argument>
                <argument>-benchmarks=beam_integration_benchmark</argument>
                <argument>-beam_it_profile=io-it</argument>
                <argument>-beam_location=${beamRootProjectDir}</argument>
                <argument>-beam_prebuilt=true</argument>
                <argument>-beam_sdk=java</argument>
                <argument>-kubeconfig=${kubeconfig}</argument>
                <argument>-kubectl=${kubectl}</argument>
                <!-- runner overrides, controlled via forceDirectRunner -->
                <argument>${pkbBeamRunnerProfile}</argument>
                <argument>${pkbBeamRunnerOption}</argument>
                <!-- specific to this IO -->
                <argument>-beam_options_config_file=${beamRootProjectDir}/.test-infra/kubernetes/postgres/pkb-config.yml</argument>
                <argument>-beam_kubernetes_scripts=${beamRootProjectDir}/.test-infra/kubernetes/postgres/postgres.yml</argument>
                <argument>-beam_it_module=sdks/java/io/jdbc</argument>
                <argument>-beam_it_class=org.apache.beam.sdk.io.jdbc.JdbcIOIT</argument>
                <!-- arguments typically defined by user -->
                <argument>-beam_it_options=${integrationTestPipelineOptions}</argument>
              </arguments>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!--
      io-it-suite overrides part of io-it-suite, allowing users to run tests
      when they are on a separate network from the kubernetes cluster by
      creating a LoadBalancer service.
    -->
    <profile>
      <id>io-it-suite-local</id>
      <activation><property><name>io-it-suite-local</name></property></activation>
      <properties>
        <!-- This is based on the location of the current pom relative to the root
             See discussion in BEAM-2460 -->
        <beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>groovy-maven-plugin</artifactId>
            <version>${groovy-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>find-supported-python-for-compile</id>
                <phase>initialize</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <source>${beamRootProjectDir}/sdks/python/findSupportedPython.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin><commit_msg>Updated jdbc's pom.xml<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-sdks-java-io-parent</artifactId>
    <version>2.3.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>beam-sdks-java-io-jdbc</artifactId>
  <name>Apache Beam :: SDKs :: Java :: IO :: JDBC</name>
  <description>IO to read and write on JDBC datasource.</description>

  <!--
      The dataflow-runner and spark-runner profiles support using those runners during an integration test. These are
      not the long-term way we want to support using runners in ITs (e.g. it is annoying to add to all IO modules.)
      We cannot create a dependency IO -> Runners since the runners depend on IO (e.g. kafka depends on spark.)
  -->

  <profiles>
    <!-- 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.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>

    <!--
        This profile invokes PerfKitBenchmarker, which does benchmarking of
        the IO ITs. The arguments passed to it allow it to invoke mvn again
        with the desired benchmark.

        To invoke this, run:

        mvn verify -Dio-it-suite -pl sdks/java/io/jdbc
            -DpkbLocation="path-to-pkb.py" \
            -DintegrationTestPipelineOptions='["-tempRoot=gs://bucket/staging"]'
    -->
    <profile>
      <id>io-it-suite</id>
      <activation>
        <property><name>io-it-suite</name></property>
      </activation>
      <properties>
      <!-- This is based on the location of the current pom relative to the root
           See discussion in BEAM-2460 -->
        <beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>groovy-maven-plugin</artifactId>
            <version>${groovy-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>find-supported-python-for-compile</id>
                <phase>initialize</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <source>${beamRootProjectDir}/sdks/python/findSupportedPython.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>${maven-exec-plugin.version}</version>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <executable>${python.interpreter.bin}</executable>
              <arguments>
                <argument>${pkbLocation}</argument>
                <argument>-benchmarks=beam_integration_benchmark</argument>
                <argument>-beam_it_profile=io-it</argument>
                <argument>-beam_location=${beamRootProjectDir}</argument>
                <argument>-beam_prebuilt=true</argument>
                <argument>-beam_sdk=java</argument>
                <argument>-kubeconfig=${kubeconfig}</argument>
                <argument>-kubectl=${kubectl}</argument>
                <!-- runner overrides, controlled via forceDirectRunner -->
                <argument>${pkbBeamRunnerProfile}</argument>
                <argument>${pkbBeamRunnerOption}</argument>
                <!-- specific to this IO -->
                <argument>-beam_options_config_file=${beamRootProjectDir}/.test-infra/kubernetes/postgres/pkb-config.yml</argument>
                <argument>-beam_kubernetes_scripts=${beamRootProjectDir}/.test-infra/kubernetes/postgres/postgres.yml</argument>
                <argument>-beam_it_module=sdks/java/io/jdbc</argument>
                <argument>-beam_it_class=org.apache.beam.sdk.io.jdbc.JdbcIOIT</argument>
                <!-- arguments typically defined by user -->
                <argument>-beam_it_options=${integrationTestPipelineOptions}</argument>
              </arguments>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!--
      io-it-suite-local overrides part of io-it-suite, allowing users to run tests
      when they are on a separate network from the kubernetes cluster by
      creating a LoadBalancer service.
    -->
    <profile>
      <id>io-it-suite-local</id>
      <activation><property><name>io-it-suite-local</name></property></activation>
      <properties>
        <!-- This is based on the location of the current pom relative to the root
             See discussion in BEAM-2460 -->
        <beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.gmaven</groupId>
            <artifactId>groovy-maven-plugin</artifactId>
            <version>${groovy-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>find-supported-python-for-compile</id>
                <phase>initialize</phase>
                <goals>
                  <goal>execute</goal>
                </goals>
                <configuration>
                  <source>${beamRootProjectDir}/sdks/python/findSupportedPython.groovy</source>
                </configuration>
              </execution>
            </executions>
          </plugin>
{'fraction_non_alphanumeric': 0.12093528397112374, 'fraction_numerical': 0.005494154475180477, 'mean_word_length': 2.054439024390244, 'pattern_counts': {'":': 0, '<': 435, '<?xml version=': 2, '>': 437, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 9}, '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': '4006995', 'n_tokens_mistral': 4593, 'n_tokens_neox': 4121, 'n_words': 883}