mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
dee355b4a7
- artifacts/decompiled 树与相关源码变更 - maven-cw-elevator-application 业务 docs 与 package-info - scripts 下 formatter 校验与辅助脚本 - 其他子工程/接口与发布线一并纳入版本控制 Made-with: Cursor Former-commit-id: e102e8cab64e575bcd23c9a66a598aa1892bb492
19 lines
871 B
Bash
Executable File
19 lines
871 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Apply Alibaba Eclipse formatter to all maven-* (same version/config as check_maven_formatter_validate.sh).
|
|
# Run from repo root with JDK 8. WARNING: rewrites many Java files — commit or review diff first.
|
|
set -euo pipefail
|
|
REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
export JAVA_HOME="${JAVA_HOME:-/usr/lib/jvm/java-8-openjdk-amd64}"
|
|
export PATH="${JAVA_HOME}/bin:${PATH}"
|
|
CONFIG="${REPO_ROOT}/docs/style/alibaba-eclipse-codestyle.xml"
|
|
FMT_VER="2.16.0"
|
|
FMT_GOAL="net.revelc.code.formatter:formatter-maven-plugin:${FMT_VER}:format"
|
|
for d in "${REPO_ROOT}"/maven-*/; do
|
|
[ -f "${d}pom.xml" ] || continue
|
|
echo ">>> $(basename "$d")"
|
|
(cd "$d" && mvn -q -DskipTests \
|
|
-DconfigFile="${CONFIG}" -DlineEnding=LF -Dproject.build.sourceEncoding=UTF-8 \
|
|
${FMT_GOAL})
|
|
done
|
|
echo "Done. Run scripts/check_maven_formatter_validate.sh to confirm."
|