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