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
4 changes: 2 additions & 2 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ signing {
nexusPublishing {
repositories {
sonatype {
nexusUrl.set(uri('https://s01.oss.sonatype.org/service/local/'))
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
username.set(System.getenv('MAVEN_USERNAME'))
Comment on lines +54 to 56
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Verify new Central-Portal endpoints

According to Sonatype’s migration guide the staging API is
https://central.sonatype.com/api/v1/staging and snapshots stay on s01.oss.sonatype.org.
The URLs used here (ossrh-staging-api.central.sonatype.com and /repository/maven-snapshots/) are not documented and may 404.

-            nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
-            snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
+            nexusUrl.set(uri('https://central.sonatype.com/api/v1/staging'))
+            snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))

Also, the workflows still use OSSRH_USERNAME/OSSRH_TOKEN; Central Portal requires a generated ‘token’ credential instead.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
nexusUrl.set(uri('https://ossrh-staging-api.central.sonatype.com/service/local/'))
snapshotRepositoryUrl.set(uri('https://central.sonatype.com/repository/maven-snapshots/'))
username.set(System.getenv('MAVEN_USERNAME'))
nexusUrl.set(uri('https://central.sonatype.com/api/v1/staging'))
snapshotRepositoryUrl.set(uri('https://s01.oss.sonatype.org/content/repositories/snapshots/'))
username.set(System.getenv('MAVEN_USERNAME'))
🤖 Prompt for AI Agents
In publish.gradle around lines 54 to 56, update the nexusUrl to
'https://central.sonatype.com/api/v1/staging' as per Sonatype's migration guide,
and change the snapshotRepositoryUrl to use the 's01.oss.sonatype.org' domain
for snapshots. Also, replace the environment variables for authentication from
'OSSRH_USERNAME' and 'OSSRH_TOKEN' to use the new Central Portal generated token
credentials accordingly.

password.set(System.getenv('MAVEN_PASSWORD'))
}
Expand Down
Loading