blob: b22905a177f4ae9a97b843c030024be74739962a [file] [log] [blame]
<?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</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>
<properties>
<netty.version>4.0.43.Final</netty.version>
</properties>
<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>
<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>-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>
<!-- 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>
<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>
<!-- 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-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>
<!-- 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>
<!-- 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>
</profiles>
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
</dependency>
<!-- compile dependencies -->
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<scope>provided</scope>
</dependency>
<!-- test dependencies -->
<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>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-common</artifactId>
<scope>test</scope>
<classifier>tests</classifier>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-common</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>