<?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-sdks-java-io-parent</artifactId>
    <groupId>org.apache.beam</groupId>
    <version>2.3.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <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>
  <profiles>
    <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.11</artifactId>
          <scope>runtime</scope>
        </dependency>
        <dependency>
          <groupId>org.apache.spark</groupId>
          <artifactId>spark-core_2.11</artifactId>
          <scope>runtime</scope>
          <exclusions>
            <exclusion>
              <artifactId>jul-to-slf4j</artifactId>
              <groupId>org.slf4j</groupId>
            </exclusion>
          </exclusions>
        </dependency>
      </dependencies>
      <properties>
        <netty.version>4.0.43.Final</netty.version>
      </properties>
    </profile>
    <profile>
      <id>io-it-suite</id>
      <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>-beam_it_timeout=1800</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>
                <argument>${pkbBeamRunnerProfile}</argument>
                <argument>${pkbBeamRunnerOption}</argument>
                <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>
                <argument>-beam_it_options=${integrationTestPipelineOptions}</argument>
              </arguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
      </properties>
    </profile>
    <profile>
      <id>io-it-suite-local</id>
      <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>-beam_it_timeout=1800</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>
                <argument>${pkbBeamRunnerProfile}</argument>
                <argument>${pkbBeamRunnerOption}</argument>
                <argument>-beam_options_config_file=${beamRootProjectDir}/.test-infra/kubernetes/postgres/pkb-config-local.yml</argument>
                <argument>-beam_kubernetes_scripts=${beamRootProjectDir}/.test-infra/kubernetes/postgres/postgres.yml,${beamRootProjectDir}/.test-infra/kubernetes/postgres/postgres-service-for-local-dev.yml</argument>
                <argument>-beam_it_module=sdks/java/io/jdbc</argument>
                <argument>-beam_it_class=org.apache.beam.sdk.io.jdbc.JdbcIOIT</argument>
                <argument>-beam_it_options=${integrationTestPipelineOptions}</argument>
              </arguments>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${surefire-plugin.version}</version>
            <configuration>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <beamRootProjectDir>${project.parent.parent.parent.parent.basedir}</beamRootProjectDir>
      </properties>
    </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>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-core</artifactId>
      <version>2.3.0</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>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-dbcp2</artifactId>
      <version>2.1.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <version>2.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.google.auto.value</groupId>
      <artifactId>auto-value</artifactId>
      <version>1.5.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.12.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbyclient</artifactId>
      <version>10.12.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbynet</artifactId>
      <version>10.12.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-runners-direct-java</artifactId>
      <version>2.3.0</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>beam-model-pipeline</artifactId>
          <groupId>org.apache.beam</groupId>
        </exclusion>
        <exclusion>
          <artifactId>beam-runners-local-java-core</artifactId>
          <groupId>org.apache.beam</groupId>
        </exclusion>
        <exclusion>
          <artifactId>beam-runners-core-construction-java</artifactId>
          <groupId>org.apache.beam</groupId>
        </exclusion>
        <exclusion>
          <artifactId>beam-runners-core-java</artifactId>
          <groupId>org.apache.beam</groupId>
        </exclusion>
      </exclusions>
    </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.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-jdk14</artifactId>
      <version>1.7.25</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
      <version>9.4.1212.jre7</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-core</artifactId>
      <version>2.3.0</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-io-common</artifactId>
      <version>2.3.0</version>
      <classifier>tests</classifier>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.beam</groupId>
      <artifactId>beam-sdks-java-io-common</artifactId>
      <version>2.3.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>

