From 409f77da07a67319c8bf99d4de2373f59ed922bc Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 27 Aug 2025 14:50:30 -0400 Subject: [PATCH 1/3] update Maven snapshot release id and URL #11766 #11512 --- modules/dataverse-spi/pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/dataverse-spi/pom.xml b/modules/dataverse-spi/pom.xml index 8c31a2a4026..a603e274234 100644 --- a/modules/dataverse-spi/pom.xml +++ b/modules/dataverse-spi/pom.xml @@ -64,11 +64,13 @@ - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots + central + https://central.sonatype.com/repository/maven-snapshots/ + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -110,7 +112,9 @@ nexus-staging-maven-plugin true + ossrh + https://s01.oss.sonatype.org true From 4ed1879c26e947fcb81d085fa7431541a76c291f Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 27 Aug 2025 14:51:08 -0400 Subject: [PATCH 2/3] explain how to publish a maven snapshot locally #11766 #11512 --- .../developers/making-library-releases.rst | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/doc/sphinx-guides/source/developers/making-library-releases.rst b/doc/sphinx-guides/source/developers/making-library-releases.rst index be867f9196a..0daa7fb89db 100755 --- a/doc/sphinx-guides/source/developers/making-library-releases.rst +++ b/doc/sphinx-guides/source/developers/making-library-releases.rst @@ -36,6 +36,32 @@ Releasing a Snapshot Version to Maven Central That is to say, to make a snapshot release, you only need to get one or more commits into the default branch. +It's possible, of course, to make snapshot releases outside of GitHub Actions, from environments such as your laptop. Generally, you'll want to look at the GitHub Action and try to do the equivalent. You'll need a file set up locally at ``~/.m2/settings.xml`` with the following (contact a core developer for the redacted bits): + +.. code-block:: bash + + + + + central + REDACTED + REDACTED + + + + +Then, study the GitHub Action and perform similar commands from your local environment. For example, as of this writing, for the dataverse-spi project, you can run the following commands, substituting the suffix you need: + +``mvn -f modules/dataverse-spi -Dproject.version.suffix="2.1.0-PR11767-SNAPSHOT" verify`` + +``mvn -f modules/dataverse-spi -Dproject.version.suffix="2.1.0-PR11767-SNAPSHOT" deploy`` + +This will upload the snapshot here, for example: https://central.sonatype.com/repository/maven-snapshots/io/gdcc/dataverse-spi/2.1.02.1.0-PR11767-SNAPSHOT/dataverse-spi-2.1.02.1.0-PR11767-20250827.182026-1.jar + +Before OSSRH was retired, you could browse through snapshot jars you published at https://s01.oss.sonatype.org/content/repositories/snapshots/io/gdcc/dataverse-spi/2.0.0-PR9685-SNAPSHOT/, for example. Now, even though you may see the URL of the jar as shown above during the "deploy" step, if you try to browse the various snapshot jars at https://central.sonatype.com/repository/maven-snapshots/io/gdcc/dataverse-spi/2.1.02.1.0-PR11767-SNAPSHOT/ you'll see "This maven2 hosted repository is not directly browseable at this URL. Please use the browse or HTML index views to inspect the contents of this repository." Sadly, the "browse" and "HTML index" links don't work, as noted in a `question `_ on the Sonatype Community forum. Below is a suggestion for confirming that the jar was uploaded properly, which is to use Maven to copy the jar to your local directory. You could then compare checksums. + +``mvn dependency:copy -DrepoUrl=https://central.sonatype.com/repository/maven-snapshots/ -Dartifact=io.gdcc:dataverse-spi:2.1.02.1.0-PR11767-SNAPSHOT -DoutputDirectory=.`` + Releasing a Release (Non-Snapshot) Version to Maven Central ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From f570aaaf411b76f6147d37c06a80fceaaa98962b Mon Sep 17 00:00:00 2001 From: Philip Durbin Date: Wed, 27 Aug 2025 16:24:05 -0400 Subject: [PATCH 3/3] add TODO comments to spi workflow #11766 #11512 --- .github/workflows/spi_release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/spi_release.yml b/.github/workflows/spi_release.yml index 6398edca412..1d29cdf76c9 100644 --- a/.github/workflows/spi_release.yml +++ b/.github/workflows/spi_release.yml @@ -42,6 +42,7 @@ jobs: with: java-version: '17' distribution: 'adopt' + # TODO: change this from ossrh to central? server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD @@ -80,6 +81,7 @@ jobs: with: java-version: '17' distribution: 'adopt' + # TODO: change this from ossrh to central? server-id: ossrh server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD