Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-5234

Build Oracle connector by default without Maven profiles

XMLWordPrintable

      So presently the Oracle connector has several profile toggles

      oracle
      This activates all Oracle-related artifacts to be built by Maven. This is required in order for any Oracle bit to be formatted, compiled, etc.

      oracle-ci
      Used by GH actions to run the Oracle build without requiring the Xstream dependencies.

      oracle-docker
      Starts an Oracle instance based on the pre-baked container image from quay.io.

      oracle-image
      Used by the debezium-testing-system

      xstream
      Adds the Oracle Instant client dependency to the Oracle connector build and specifically enables the xstream adapter, used for testing with xstream.

      xstream-dependency
      Adds the Oracle Instant client dependency to the Oracle connector build.
      This profile is active by default.

      In order to always build the Oracle bits by default, we effectively need to adjust the build semantics that surrounds Oracle, most notably we need to always exclude the Xstream bits and Instant Client dependencies by default.

      1. Running mvn clean install would build the Oracle connector, but we'd exclude the Debezium source classes that require XStream, so in other words, we would use the oracle-ci profile as the default behavior.
      2. The oracle profile would be removed.
      3. The oracle-ci profile would be removed.
      4. Introduce oracle-tests that would enable the execution of the Oracle tests, by default they're just compiled but not executed.
      5. Rename xstream-dependency to oracle-xstream, which adds the xstream dependenecy to the build. This would be required for upstream releases as a minimum and we could use it for product builds if we wanted to include the xstream bits.

      To build for Oracle LogMiner (without tests)

      mvn clean install -pl debezium-connector-oracle -am
      

      To build for Oracle Logminer (with tests)

      mvn clean install -pl debezium-connector-oracle -am -Poracle-tests
      

      To build for Oracle XStream (without tests)

      mvn clean install -pl debezium-connector-oracle -am -Poracle-xstream
      

      To build for Oracle XStream (with tests)

      mvn clean install -pl debezium-connector-oracle -am -Poracle-xstream,oracle-tests
      

      The benefit to this is that with Oracle always being built, changes contributed would at the very least compile the Oracle modules and avoid any situation where a new feature is introduced but fails to compile locally when Oracle is enabled (at least outside of the XStream adapter code).

              ccranfor@redhat.com Chris Cranford
              ccranfor@redhat.com Chris Cranford
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: