Cheatsheet

A set of references to provide quick access to essential information.

Debezium §

Notes from contributing to Debezium and debezium-examples.

Build the project §

Full build without integration tests:

shell
./mvnw -T 4 clean verify -DskipITs

Build everything except one module:

shell
./mvnw -T 4 clean verify -DskipITs -pl '!:debezium-ai-embeddings-minilm'

Resume from a module while skipping one flaky test:

shell
./mvnw -T 4 clean verify -DskipITs -rf :debezium-ai-embeddings-minilm \
  -Dtest='!EmbeddingsMiniLmL6V2Test' -Dsurefire.failIfNoSpecifiedTests=false

Skip a single test §

Exclude a test class from Surefire without failing the run when a module has no matching tests:

shell
-Dtest='!EmbeddingsMiniLmL6V2Test' -Dsurefire.failIfNoSpecifiedTests=false

Resume (-rf) needs installed snapshots §

-rf :debezium-ai-embeddings-minilm resumes the reactor from that module, cutting all upstream modules out of the build. Maven then has to resolve io.debezium:debezium-util:3.7.0-SNAPSHOT, the debezium-schema-generator:3.7.0-SNAPSHOT plugin, etc. from ~/.m2 or remote repositories — but unreleased snapshots aren't on any remote, and the local repository only contains cached "not found" markers (.lastUpdated files) when previous builds used verify, which never installs anything into ~/.m2.

The fix — install the upstream modules once:

shell
./mvnw -T 4 clean install -DskipTests -DskipITs \
  -pl :debezium-schema-generator,:debezium-ai-embeddings-minilm,:debezium-ai-embeddings-ollama,:debezium-ai-embeddings-voyage-ai,:debezium-common -am

-am (also-make) pulls the whole upstream dependency closure (util, core, embeddings base, parent POMs) into the reactor, and install writes them to ~/.m2 so a later -rf resume can find them. After this, the original command works as-is.

Rule of thumb: -rf only works if a prior run used install rather than verify.

Rebase a pull-request branch §

Step-by-step rebase of dbz#1821 onto an updated main.

Make sure you're on your branch with a clean tree, and note where the branch is now as a safety net:

shell
git checkout "dbz#1821"
git status
git branch backup-dbz-1821

Rebase onto the updated main:

shell
git rebase main

Only your own commit gets replayed — commits already contained in main are skipped automatically.

If a conflict appears:

shell
# fix the conflicted files in your editor, then:
git add <fixed-files>
git rebase --continue
# or bail out entirely and return to the pre-rebase state:
git rebase --abort

Verify the result — your commit should sit directly on top of upstream main's tip:

shell
git log --oneline -5

Since the rebase rewrote the commit's hash, a plain push will be rejected — force-push safely when you're ready to update your fork:

shell
git push --force-with-lease origin "dbz#1821"

--force-with-lease refuses to overwrite the remote if someone else pushed to that branch in the meantime.

Git §

Everyday Git commands from open-source contribution work.

Sign off the last commit §

Set your identity, amend the last commit with a DCO sign-off, verify the message, then update the remote branch:

shell
git config user.name "Ilyas Ahsan"
git commit --amend --no-edit --signoff
git log -1 --format=%B
git push --force-with-lease origin "dbz#1821"

--force-with-lease is safer than --force — it refuses to push if someone else updated the remote branch in the meantime.