From 97f72a36d8f3f17e8ed119686b9b1ce0fde2077b Mon Sep 17 00:00:00 2001 From: caske Date: Mon, 16 Nov 2026 23:02:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E6=89=93=E5=8C=85=E8=84=9A=E6=9C=AC=E6=97=A0=E6=B3=95=E6=89=BE?= =?UTF-8?q?=E5=88=B0=E6=A8=A1=E5=9D=97=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/release.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index b80eb97..72167ab 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -169,7 +169,10 @@ if [[ "$MODE" == "release" ]]; then fi log "统一代码格式(spotless)" -run mvn -B -ntp -q com.diffplug.spotless:spotless-maven-plugin:apply +# 走 compile 生命周期:spotless 绑定在 compile 阶段,只在声明了它的模块执行。 +# 直接调用插件 goal 会对整个 reactor 的每个模块执行,而没有 parent 的 simple-starter-bom +# 并未声明该插件,会报 "Spotless plugin absent from the project"。 +run mvn -B -ntp -q -DskipTests compile if [[ $DRY_RUN -eq 0 && -n "$(git status --porcelain)" ]]; then die "spotless 产生了源码改动,请提交后再发布:$(git status --short)" fi