Skip to content

Conversation

@pdurbin
Copy link
Member

@pdurbin pdurbin commented Oct 17, 2025

What this PR does / why we need it:

As explained in this issue...

... 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:

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 #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!

At #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
<snapshotRepository>
<id>central</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
Copy link
Member Author

Choose a reason for hiding this comment

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

At https://github.com/IQSS/dataverse/actions/runs/18604319308/job/53050122472?pr=11905 I see "deploy snapshot" is failing with this:

Error: Failed to execute goal org.sonatype.central:central-publishing-maven-plugin:0.9.0:publish (injected-central-publishing) on project dataverse-spi: Failed to deploy artifacts: Could not transfer artifact io.gdcc:dataverse-spi:jar:2.1.0-PR11905-20251017.204025-1 from/to central (https://central.sonatype.com/repository/maven-snapshots/): status code: 401, reason phrase: Unauthorized (401) -> [Help 1]

Hmm. 🤔

@pdurbin pdurbin self-assigned this Oct 17, 2025
@cmbz cmbz added FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) FY26 Sprint 9 FY26 Sprint 9 (2025-10-22 - 2025-11-05) labels Oct 22, 2025
@pdurbin
Copy link
Member Author

pdurbin commented Nov 4, 2025

@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.

@cmbz cmbz added the FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) label Nov 5, 2025
@pdurbin pdurbin moved this from In Review 🔎 to In Progress 💻 in IQSS Dataverse Project Nov 6, 2025
@cmbz cmbz added the FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) label Nov 22, 2025
@jp-tosca jp-tosca added the Size: 80 A percentage of a sprint. 56 hours. label Dec 3, 2025
@cmbz cmbz added the FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) label Dec 3, 2025
@cmbz cmbz added the FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) label Dec 17, 2025
@cmbz cmbz added the FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) label Dec 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FY26 Sprint 8 FY26 Sprint 8 (2025-10-08 - 2025-10-22) FY26 Sprint 9 FY26 Sprint 9 (2025-10-22 - 2025-11-05) FY26 Sprint 10 FY26 Sprint 10 (2025-11-05 - 2025-11-19) FY26 Sprint 11 FY26 Sprint 11 (2025-11-20 - 2025-12-03) FY26 Sprint 12 FY26 Sprint 12 (2025-12-03 - 2025-12-17) FY26 Sprint 13 FY26 Sprint 13 (2025-12-17 - 2025-12-31) FY26 Sprint 14 FY26 Sprint 14 (2025-12-31 - 2026-01-14) Size: 80 A percentage of a sprint. 56 hours.

Projects

Status: In Progress 💻

Development

Successfully merging this pull request may close these issues.

6 participants