Files
Ankur 5439c041d0 Add axon-event-sourcing module: Axon 5.4.2 entity, projection, replay
Event-sourced bank account on Axon Framework 5.4.2 + Spring Boot 4.1.1,
with transcripts generated by tests and three reproduced JPA-store variants.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b69H5rTewUKPyhGS8r
2026-12-02 00:02:00 +05:30

22 lines
963 B
Bash
Executable File

#!/usr/bin/env bash
# Reproduces three real behaviours by compiling a deliberately broken BankAccount from src/broken/
# in a throwaway copy of this module, and captures the exception text into output/.
set -euo pipefail
cd "$(dirname "$0")/.."
MODULE_DIR="$(pwd)"
run_variant () {
local name="$1" out="$2"
local tmp; tmp="$(mktemp -d)"
cp ../pom.xml "$tmp/pom.xml"
mkdir "$tmp/axon-event-sourcing"
cp -r pom.xml src "$tmp/axon-event-sourcing/"
cp src/broken/"$name"/*.java "$tmp/axon-event-sourcing/src/main/java/com/ankurm/axondemo/domain/"
(cd "$tmp/axon-event-sourcing" && mvn -B -q test -Dtest=VariantProbeTest \
-Dvariant="$name" -Dvariant.file="$out" -Dtranscript.dir="$MODULE_DIR/output" >/dev/null 2>&1 || true)
rm -rf "$tmp"
echo "wrote output/$out"
}
run_variant tag-key-mismatch 05-variant-tag-key-mismatch.txt
run_variant id-only-creator 06-variant-id-only-creator.txt
run_variant two-tags 07-variant-two-tags.txt