Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,12 @@ cmd_publish() {
$no_docker && mvn_args=(-q -DnoDocker=true -P "$profile" deploy)
$skip_tests && mvn_args=(-q -DskipTests -P "$profile" deploy)
if $no_docker && $skip_tests; then mvn_args=(-q -DskipTests -DnoDocker=true -P "$profile" deploy); fi
run_cmd mvn $MVN_SETTINGS_OPTS "${mvn_args[@]}"
# For Central publishing, prefer the settings provided by actions/setup-java (no -s override)
if [[ "$profile" == "release-central" ]]; then
run_cmd mvn "${mvn_args[@]}"
else
run_cmd mvn $MVN_SETTINGS_OPTS "${mvn_args[@]}"
Comment on lines +136 to +140

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore fallback to project settings for local central publish

The new branch that skips MVN_SETTINGS_OPTS for the release-central profile causes scripts/release.sh publish --repo central to ignore .mvn/settings.xml. That file now contains the repository and server credentials driven by CENTRAL_USERNAME/CENTRAL_PASSWORD, so on a developer machine (where actions/setup-java is not writing ~/.m2/settings.xml) the command runs without any server configuration and the deploy will fail with a 401/missing repository. Consider only skipping -s .mvn/settings.xml when a CI‑provided settings file is present, otherwise retain the previous behaviour so local releases continue to work.

Useful? React with 👍 / 👎.

fi
}

cmd_next_snapshot() {
Expand Down
Loading