Migrate to com.vanniktech.maven.publish#54
Merged
Conversation
The gradle-nexus plugin reaches the Central Portal through the OSSRH staging API compatibility service, which has no release endpoint, so publishing a release had to be finished by hand in the portal web interface. This plugin talks to the portal API directly and releases as part of the build. Signed-off-by: Fredrik Fornwall <fredrik@fornwall.net>
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.
Releasing 0.12.0 failed at the final step:
io.github.gradle-nexus.publish-pluginreaches the Central Portal through theOSSRH staging API compatibility service, which has no release endpoint, so the
deployment has to be released by hand at https://central.sonatype.com/publishing.
That plugin has also not had a release since April 2024.
com.vanniktech.maven.publishtalks to the portal API directly and can releaseas part of the build.
Changes
signing,maven-publishandio.github.gradle-nexus.publish-pluginplugins with
com.vanniktech.maven.publish0.37.0, which applies the first two itself.withJavadocJar()/withSourcesJar(), as the plugin adds both.nexusPublishing/publishing/signingwith a singlemavenPublishingblock.The
onlyIfpredicate that skips signing forpublishToMavenLocalis kept: thenew plugin signs local installs otherwise, which is what #26 fixed.
Verification
publishToMavenLocalinstalls jar, sources, javadoc, pom and module, and skips signing.signMavenPublicationproduces signatures thatgpg --verifyaccepts.buildpasses with 23 tests and no warnings.Not verified: the actual upload and release, which can only be exercised by a real
release. Credentials are read from
mavenCentralUsername/mavenCentralPasswordrather than
sonatypeUsername/sonatypePassword.🤖 Generated with Claude Code