Add migration-5-to-7 module: Hibernate 5.6.15 vs 7.4.14 jar diff, compile checks, schema defaults and cheat-sheet snippets

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YPgGH6aMbSLANL3E2HHmS6
This commit is contained in:
2026-10-25 19:17:24 +00:00
co-authored by Claude Sonnet 5.5
parent 357ba84e5c
commit aea104f021
57 changed files with 5187 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# Compiles src/compat/*.java against Hibernate 5.6.15 (h5/) and 7.4.14 (h7/) and records javac's answer in output/.
set -u
cd "$(dirname "$0")/.."
mkdir -p target output
compile() { # version dir file outfile
local v=$1 dir=$2 f=$3 out=$4
rm -rf target/classes-$f-$v; mkdir -p target/classes-$f-$v
{
echo "Hibernate $v, compiling $f.java"
javac -Xlint:deprecation -proc:none -d target/classes-$f-$v -cp "$(cat target/cp-$v.txt)" src/compat/$f.java 2>&1 | grep -v "^Picked up"
echo "javac exit status: ${PIPESTATUS[0]}"
} >> $out
}
for pair in "h5:5.6.15" "h7:7.4.14"; do
dir=${pair%%:*}; v=${pair##*:}
(cd $dir && mvn -q -B dependency:build-classpath -Dmdep.outputFile=../target/cp-$v.txt >/dev/null) || { echo "classpath failed for $v"; exit 1; }
for spec in "OldHibernate:03-old-hibernate-apis" "NewHibernate:04-new-hibernate-apis" "OldAnnotations:05-old-annotations" "NewAnnotations:06-new-annotations" "JavaxNamespace:09-namespace-javax" "JakartaNamespace:09-namespace-jakarta"; do
f=${spec%%:*}; n=${spec##*:}
out=output/$n-$v.txt; : > $out
compile $v $dir $f $out
done
done