#!/usr/bin/env bash # Re-runs MigratorTest on 4.2.0 with the two Actuator-related starters removed from the classpath and # stores what the migrator prints in output/20-migrator-without-actuator.txt. The migrator can only # report a key whose metadata is on the classpath, and the metadata for management.* keys ships in # the Actuator/Micrometer jars. set -euo pipefail cd "$(dirname "$0")/.." python3 - <<'PY' import re s = open("pom.xml").read() for art in ("spring-boot-starter-actuator", "spring-boot-starter-opentelemetry"): s = re.sub(r"\s*\s*org.springframework.boot\s*%s\s*" % art, "", s) open("pom-no-actuator.xml", "w").write(s) PY cp output/04-properties-migrator-report.txt target/04-with-actuator.txt # ConventionSpellingsTest and MigratedClientsTest need Actuator/Micrometer; only MigratorTest runs here mvn -B -q -f pom-no-actuator.xml test -Dtest=MigratorTest -Dsurefire.failIfNoSpecifiedTests=false >/dev/null sed 's/^# 04-properties-migrator-report/# 20-migrator-without-actuator/' output/04-properties-migrator-report.txt > output/20-migrator-without-actuator.txt cp target/04-with-actuator.txt output/04-properties-migrator-report.txt rm -f pom-no-actuator.xml cat output/20-migrator-without-actuator.txt