tet123/debezium-connector-oracle/pom.xml

813 lines
36 KiB
XML

<?xml version="1.0"?>
<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">
<parent>
<groupId>io.debezium</groupId>
<artifactId>debezium-parent</artifactId>
<version>2.5.0-SNAPSHOT</version>
<relativePath>../debezium-parent/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>debezium-connector-oracle</artifactId>
<name>Debezium Connector for Oracle</name>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-core</artifactId>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-storage-kafka</artifactId>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-storage-file</artifactId>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-ddl-parser</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core-jakarta</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod-jakarta</artifactId>
</dependency>
<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
</dependency>
<!-- Dependencies needed for XML support -->
<dependency>
<groupId>com.oracle.database.xml</groupId>
<artifactId>xdb</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.oracle.database.xml</groupId>
<artifactId>xmlparserv2</artifactId>
<scope>provided</scope>
</dependency>
<!-- Dependencies for OpenLogReplicator -->
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${version.com.google.protobuf}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${version.com.google.protobuf}</version>
</dependency>
<!-- Testing -->
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-core</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-embedded</artifactId>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-embedded</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-testing-testcontainers</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
</exclusion>
<exclusion>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
<!-- Required by VerifyRecord -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-connect-avro-converter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.apicurio</groupId>
<artifactId>apicurio-registry-utils-converter</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>slf4j-jboss-logmanager</artifactId>
<groupId>org.jboss.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- Used for unit testing with Kafka -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_${version.kafka.scala}</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<adapter.name>logminer</adapter.name>
<log.mining.buffer.type.name>memory</log.mining.buffer.type.name>
<log.mining.read.only.mode>false</log.mining.read.only.mode>
<version.oracle.server>19.3.0</version.oracle.server>
<protobuf.output.directory>${project.basedir}/generated-sources</protobuf.output.directory>
<!--
By default, the Oracle module's tests are not executed but only compiled.
In order to execute tests, the profile "oracle-tests" must be explicitly toggled.
-->
<skipITs>true</skipITs>
<!--
Specify properties used for setting up the Oracle DB container instance/s for integration tests.
Note that the `docker.host.address` property is computed from the IP address of DOCKER_HOST, which will
work on all platforms.
-->
<!-- This should be kept in sync with the infinispan dependencies used -->
<oracle.infinispan.host>${docker.host.address}</oracle.infinispan.host>
<oracle.infinispan.image>infinispan/server:${version.infinispan.server}</oracle.infinispan.image>
<oracle.infinispan.port>11222</oracle.infinispan.port>
<oracle.infinispan.user>admin</oracle.infinispan.user>
<oracle.infinispan.password>admin</oracle.infinispan.password>
<docker.skip>false</docker.skip>
<docker.showLogs>true</docker.showLogs>
<connector.assembly.ref>connector-distribution</connector.assembly.ref>
<!-- Apicurion container properties -->
<apicurio.port>8080</apicurio.port>
<apicurio.init.timeout>60000</apicurio.init.timeout> <!-- 60 seconds -->
</properties>
<build>
<resources>
<!-- Apply the properties set in the POM to the resource files -->
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
<includes>
<include>*</include>
<include>**/*</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
<includes>
<include>*</include>
<include>**/*</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
By default we exclude the Xstream sources.
To enable Xstream support, use the "oracle-xstream" profile
-->
<excludes>
<exclude>**/io/debezium/connector/oracle/xstream/**</exclude>
</excludes>
<testExcludes>
<exclude>**/io/debezium/connector/oracle/xstream/**</exclude>
</testExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl</argLine>
<systemPropertyVariables combine.children="append">
<database.connection.adapter>${adapter.name}</database.connection.adapter>
<log.mining.buffer.type>${log.mining.buffer.type.name}</log.mining.buffer.type>
<internal.log.mining.read.only>${log.mining.read.only.mode}</internal.log.mining.read.only>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<skipTests>${skipITs}</skipTests>
<enableAssertions>true</enableAssertions>
<forkCount>0</forkCount>
<argLine>-Djava.library.path=${instantclient.dir} -Ddebezium.embedded.shutdown.pause.before.interrupt.ms=20000</argLine>
<systemPropertyVariables>
<database.connection.adapter>${adapter.name}</database.connection.adapter>
<log.mining.buffer.type>${log.mining.buffer.type.name}</log.mining.buffer.type>
<internal.log.mining.read.only>${log.mining.read.only.mode}</internal.log.mining.read.only>
<javax.xml.parsers.SAXParserFactory>com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl</javax.xml.parsers.SAXParserFactory>
<version.oracle.server>${version.oracle.server}</version.oracle.server>
</systemPropertyVariables>
<runOrder>${runOrder}</runOrder>
</configuration>
</plugin>
<plugin>
<groupId>io.debezium</groupId>
<artifactId>debezium-schema-generator</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>generate-connector-metadata</id>
<goals>
<goal>generate-api-spec</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<outputDirectory>${project.build.outputDirectory}/META-INF/resources/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.os72</groupId>
<artifactId>protoc-jar-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<protocArtifact>com.google.protobuf:protoc:${version.com.google.protobuf.protoc}</protocArtifact>
<outputDirectory>${protobuf.output.directory}</outputDirectory>
<inputDirectories>
<include>src/main/proto</include>
</inputDirectories>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!--
Define several useful profiles
-->
<profiles>
<!--
Profile: oracle-tests
This specifically enables the execution of all integration tests.
By default, integration tests are only compiled but are not executed.
-->
<profile>
<id>oracle-tests</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<skipITs>false</skipITs>
</properties>
</profile>
<!--
Profile: oracle-xstream
This is a multi-faceted profile that controls several key points:
1. Adds the Oracle Instant Client & Xstream dependencies to the module
2. Includes the Xstream sources into the build, which are otherwise excluded
3. Enables the ability to execute the test suite for the Xstream adapter
-->
<profile>
<id>oracle-xstream</id>
<properties>
<!-- Point (3) enables the xstream adapter for tests -->
<adapter.name>xstream</adapter.name>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<!-- Point (1) add the Xstream dependencies -->
<dependencies>
<dependency>
<groupId>com.oracle.instantclient</groupId>
<artifactId>xstreams</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration combine.self="override">
<!-- Point (2) add the Xstream sources back into the module -->
<includes>
<include>**</include>
</includes>
<testIncludes>
<include>**</include>
</testIncludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!--
Profile: oracle-olr
This profile should be used to run the connector with the OpenLogReplicator adapter.
-->
<profile>
<id>oracle-olr</id>
<properties>
<adapter.name>olr</adapter.name>
</properties>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
</profile>
<!-- Enables all sources, useful for IDE build or releases -->
<profile>
<id>oracle-all</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>com.oracle.instantclient</groupId>
<artifactId>xstreams</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration combine.self="override">
<includes>
<include>**</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>assembly</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>com.oracle.instantclient</groupId>
<artifactId>xstreams</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration combine.self="override">
<!-- include xstream back into the module on assembly builds -->
<includes>
<include>**</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-assembly-descriptors</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<attach>true</attach> <!-- we want attach & deploy these to Maven -->
<descriptorRefs>
<descriptorRef>${connector.assembly.ref}</descriptorRef>
</descriptorRefs>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<configuration>
<systemPropertyVariables>
<isAssemblyProfileActive>true</isAssemblyProfileActive>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!--// Testing a connect REST extension in a Debezium Kafka Connect container requires a `-plugin.tar.gz` assembly package without a dependency to XStreams. //-->
<id>rest-assembly</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration combine.self="override">
<excludes>
<exclude>**/io/debezium/connector/oracle/xstream/**</exclude>
</excludes>
<testExcludes>
<exclude>**/*IT</exclude>
</testExcludes>
<testIncludes>
<include>**/io/debezium/connector/oracle/rest/**</include>
</testIncludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>io.debezium</groupId>
<artifactId>debezium-assembly-descriptors</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>default</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
<attach>false</attach>
<descriptorRefs>
<descriptorRef>${connector.assembly.ref}</descriptorRef>
</descriptorRefs>
<tarLongFileMode>posix</tarLongFileMode>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.failsafe.plugin}</version>
<configuration>
<systemPropertyVariables>
<isAssemblyProfileActive>true</isAssemblyProfileActive>
<database.username>${database.username}</database.username>
<database.password>${database.password}</database.password>
<database.dbname>${database.dbname}</database.dbname>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>quick</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>quick</name>
</property>
</activation>
<properties>
<skipITs>true</skipITs>
<docker.skip>true</docker.skip>
</properties>
</profile>
<profile>
<id>oracle-docker</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<watchInterval>500</watchInterval>
<logDate>default</logDate>
<verbose>true</verbose>
<!--autoPull>always</autoPull-->
<images>
<!-- A container for the data server replica set -->
<image>
<name>quay.io/rh_integration/dbz-oracle:${version.oracle.server}</name>
<alias>oracle1</alias>
<run>
<namingStrategy>alias</namingStrategy>
<ports>
<port>1521:1521</port>
</ports>
<log>
<prefix>oracle1</prefix>
<enabled>true</enabled>
<color>yellow</color>
</log>
<wait>
<log>DONE: Executing user defined scripts</log>
<time>120000</time> <!-- 2 minutes max -->
</wait>
</run>
<external>
<type>properties</type>
<mode>override</mode>
</external>
</image>
</images>
</configuration>
<!--
Connect this plugin to the maven lifecycle around the integration-test phase:
start the container in pre-integration-test and stop it in post-integration-test.
-->
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- This profile should be used for testing connector with Infinispan only -->
<profile>
<id>infinispan-buffer</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<log.mining.buffer.type.name>infinispan_embedded</log.mining.buffer.type.name>
</properties>
<!-- todo: when using this profile, enforce oracle-xstream being mutually exclusive -->
</profile>
<profile>
<id>infinispan-buffer-remote</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<log.mining.buffer.type.name>infinispan_remote</log.mining.buffer.type.name>
</properties>
<!-- todo: when using this profile, enforce oracle-xstream being mutually exclusive -->
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<watchInterval>500</watchInterval>
<logDate>default</logDate>
<verbose>true</verbose>
<images>
<image>
<!-- A docker image using Infinispan -->
<name>${oracle.infinispan.image}</name>
<run>
<namingStrategy>none</namingStrategy>
<env>
<USER>${oracle.infinispan.user}</USER>
<PASS>${oracle.infinispan.password}</PASS>
</env>
<ports>
<port>${oracle.infinispan.port}:11222</port>
</ports>
<log>
<prefix>infinispan</prefix>
<enabled>${docker.showLogs}</enabled>
<color>green</color>
</log>
<wait>
<time>60000</time> <!-- 60 seconds max -->
<log>Infinispan Server [0-9a-zA-z.]* started</log>
</wait>
</run>
<external>
<type>properties</type>
<mode>override</mode>
</external>
</image>
</images>
</configuration>
<!--
Connect this plugin to the maven lifecycle around the integration-test phase:
start the container in pre-integration-test and stop it in post-integration-test.
-->
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>apicurio</id>
<activation>
<activeByDefault>false</activeByDefault>
<property>
<name>apicurio</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<use.apicurio>true</use.apicurio>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<watchInterval>500</watchInterval>
<logDate>default</logDate>
<verbose>true</verbose>
<!--autoPull>always</autoPull-->
<images>
<!-- A container for the data server replica set -->
<image>
<name>apicurio/apicurio-registry-mem:${version.apicurio}</name>
<run>
<namingStrategy>none</namingStrategy>
<ports>
<port>${apicurio.port}:8080</port>
</ports>
<log>
<prefix>apicurio</prefix>
<enabled>true</enabled>
<color>blue</color>
</log>
<wait>
<log>.*apicurio-registry-app.*started in.*</log>
<time>${apicurio.init.timeout}</time>
</wait>
</run>
</image>
</images>
</configuration>
<!--
Connect this plugin to the maven lifecycle around the integration-test phase:
start the container in pre-integration-test and stop it in post-integration-test.
-->
<executions>
<execution>
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>build</goal>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>oracle-read-only</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<log.mining.read.only.mode>true</log.mining.read.only.mode>
</properties>
</profile>
</profiles>
</project>