dataverse icon indicating copy to clipboard operation
dataverse copied to clipboard

Publish SPI package to Maven Central (post defunct OSSRH)

Open pdurbin opened this issue 2 months ago • 1 comments

What this PR does / why we need it:

As explained in this issue...

  • #11512

... we need to update all packages that publish to Maven Central to get away from the old OSSRH method.

Which issue(s) this PR closes:

None. Relates to:

  • #11766
  • #11767

Special notes for your reviewer:

I hope this does it. Merge it and see? 🤷

Here's the commit message:

remove defunct ossrh and use central instead

At https://github.com/IQSS/dataverse/issues/11512 we are tracking the changes we're making get publishing to Maven Central working again now that OSSRH is not supported.

We already switched our maven parent package from old to new so I compared these versions to come up with the change in this commit:

old (OSSRH): https://github.com/gdcc/maven-parent/blob/ae7b5904d7332259825409faa77545cdff6b84b9/pom.xml new: https://github.com/gdcc/maven-parent/blob/6af0bf07d2134dd4c3f38c58b55479d82922509f/pom.xml

See also these docs: https://central.sonatype.org/publish/publish-portal-maven/#automatic-publishing

Suggestions on how to test this:

It's really hard to test GitHub Actions. If we get a failure after merging, I suppose we can try again.

Addendum

p.s. We have multiple patterns for making library releases to Maven Central and I'm much more familiar with the one I wrote about at https://guides.dataverse.org/en/6.8/developers/making-library-releases.html

If you remove the details, releasing to Maven Central boils down to two commands:

mvn release:clean
mvn release:prepare

This pattern is used for the exporters, xoai, probably sword, etc. Here's the xoai GitHub Action: https://github.com/gdcc/xoai/blob/76201f0f5eb8f12a5d0a95d797bf43a3431bbbd6/.github/workflows/maven-release.yml

The SPI library uses a different pattern because it's in the main repo. So we don't add a tag to the main repo, for example, when we make an SPI release. Here's the SPI GitHub Action: https://github.com/IQSS/dataverse/blob/bf08caf8edf7457c118312e04c26a853da5de781/.github/workflows/spi_release.yml

Once we understand this "library in the main repo" pattern better, we should add it to the docs above!

pdurbin avatar Oct 17 '25 20:10 pdurbin

@poikilotherm I'm putting you on this PR. Thanks for offering to help! As we discussed, we think the GPG secret is ok. We probably need to work more on the pom file. 😬

We also briefly discussed the idea of moving dataverse-spi to a separate repo but we agreed it's an in-depth topic that we should unpack at a future tech hours. I mentioned this at standup today.

pdurbin avatar Nov 04 '25 19:11 pdurbin