Skip to content

Migrate to com.vanniktech.maven.publish#54

Merged
fornwall merged 1 commit into
mainfrom
migrate-vanniktech-publish
Jul 25, 2026
Merged

Migrate to com.vanniktech.maven.publish#54
fornwall merged 1 commit into
mainfrom
migrate-vanniktech-publish

Conversation

@fornwall

Copy link
Copy Markdown
Owner

Releasing 0.12.0 failed at the final step:

Execution failed for task ':releaseSonatypeStagingRepository'
> Staging repository is not in desired state [released, not_found]: ... state=closed

io.github.gradle-nexus.publish-plugin reaches the Central Portal through the
OSSRH 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.publish talks to the portal API directly and can release
as part of the build.

Changes

  • Replaces the signing, maven-publish and io.github.gradle-nexus.publish-plugin
    plugins with com.vanniktech.maven.publish 0.37.0, which applies the first two itself.
  • Drops withJavadocJar()/withSourcesJar(), as the plugin adds both.
  • Replaces nexusPublishing/publishing/signing with a single mavenPublishing block.
  • Updates the comment documenting how to release.

The onlyIf predicate that skips signing for publishToMavenLocal is kept: the
new plugin signs local installs otherwise, which is what #26 fixed.

Verification

  • The generated POM is byte for byte identical to the one the old configuration produced.
  • publishToMavenLocal installs jar, sources, javadoc, pom and module, and skips signing.
  • signMavenPublication produces signatures that gpg --verify accepts.
  • build passes 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/mavenCentralPassword
rather than sonatypeUsername/sonatypePassword.

🤖 Generated with Claude Code

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>
@fornwall
fornwall merged commit 4679abf into main Jul 25, 2026
10 checks passed
@fornwall
fornwall deleted the migrate-vanniktech-publish branch July 25, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant