Repository navigation
Conversation
central-publishing-maven-plugin publishes through its publishingServerId. With -Pci,gpg, its extensions=true lifecycle participant clears maven-deploy-plugin's execution and injects the Central publish goal, so release deploys never read <distributionManagement>. Snapshot deploys are unchanged: before this change the plugin used the POM's <snapshotRepository>; after it falls back to the Central snapshots repository, with the same URL and server id (central). The block was also a trap: adding <site> would only change release:perform's goals when <goals> is unset, and this POM pins <goals>deploy</goals>.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The root POM still declared an OSSRH-style
<distributionManagement>. With-Pci,gpg,central-publishing-maven-plugin(extensions=true) replacesmaven-deploy-pluginthrough itslifecycle participant and publishes via
publishingServerId; release deploys never read thatblock. Keeping it is dead configuration and suggests a deploy path that is no longer used.
Change
Remove the
<distributionManagement>block. No replacement comment: thegpgprofile alreadyshows the Central plugin configuration, and the rationale is in the commit message.
Why this is safe
release.ymlandsnapshot.ymlrun with-Pci,gpg, so the Centralplugin is active. Its
extensions=truelifecycle participant clearsmaven-deploy-plugin'sexecution and injects the Central publish goal, so
deploydoes not readdistributionManagementat all.<snapshotRepository>;after it the plugin falls back to the Central snapshots repository. The URL
(
https://central.sonatype.com/repository/maven-snapshots/) and server id (central) areidentical before and after — verified against the plugin 0.12.0 sources
(
Constants.CENTRAL_SNAPSHOTS_URL_DEFAULT_VALUE,ArtifactDeferrerImpl.getDeploymentRepository)../mvnw deploywithout thegpgprofile is not a supported publishing path; it nowfails explicitly in
maven-deploy-plugin("repository element was not specified") instead ofsilently using a stale URL. Release and snapshot publishing are workflow-driven
(
release.yml/snapshot.yml); a dedicated release procedure page lands in the follow-up PR.Verification
git show HEAD:pom.xml | grep -n distributionManagement→ no output (the block is gone).git diff --checkclean; single commit on top of321ec905d; POM diff is a pure deletion (−10).Snapshotworkflow on pushesto
main/spring-boot-3; runtime deploy cannot be exercised locally (no Central/GPG credentials).Notes
CHANGELOG.mdentry: release tooling only, no API/behavior change for users.release.properties/*.releaseBackup.release:cleanalreadyremoves them, and leaving them unignored keeps the dry-run working-tree assertion honest.