From db112c7e092cfe1bc21ec101ad501d66f4b9bed4 Mon Sep 17 00:00:00 2001 From: Sebastian Utz Date: Fri, 19 Sep 2025 13:27:18 +0200 Subject: [PATCH] Fix sonatype central JAR publishing The OSSRH has reached EOL, new urls must be used to publish the the Maven Central Portal instead. See https://central.sonatype.org/pages/ossrh-eol/ Removed the publishing.repostiories section as this is not used and needed when using the nexus.publish plugin. --- build.gradle | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/build.gradle b/build.gradle index 99113e9..9299afd 100644 --- a/build.gradle +++ b/build.gradle @@ -87,6 +87,8 @@ java { nexusPublishing { repositories { sonatype { + nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/")) + snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/")) username = project.hasProperty('sonatypeTokenUsername') ? sonatypeTokenUsername : "" password = project.hasProperty('sonatypeTokenPassword') ? sonatypeTokenPassword : "" } @@ -125,15 +127,6 @@ publishing { } } } - repositories { - maven { - url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' - credentials { - username = project.hasProperty('sonatypeUsername') ? sonatypeUsername : "" - password = project.hasProperty('sonatypePassword') ? sonatypePassword : "" - } - } - } } signing {