Skip to content

build: drop the two repositories on the retired OSSRH host - #72

Merged
hongwei1 merged 1 commit into
develop-obpfrom
fix/drop-dead-sonatype-repos
Aug 9, 2026
Merged

build: drop the two repositories on the retired OSSRH host#72
hongwei1 merged 1 commit into
develop-obpfrom
fix/drop-dead-sonatype-repos

Conversation

@hongwei1

@hongwei1 hongwei1 commented Aug 9, 2026

Copy link
Copy Markdown
Owner

The root pom.xml declared two repositories on oss.sonatype.org (Sonatype OSSRH, the legacy staging/publishing service for Maven Central):

id URL
scala-tools.releases oss.sonatype.org/content/repositories/releases/
org.sonatype.oss.groups.public (the only <pluginRepository>) oss.sonatype.org/content/groups/public

Neither serves any artifact of its own. The host now answers with a 302 to repo1.maven.org — Maven Central — which Maven already consults by default:

GET oss.sonatype.org/content/repositories/releases/.../slf4j-api-1.7.36.pom
  -> 302 -> https://repo1.maven.org/maven2/.../slf4j-api-1.7.36.pom -> 200

So the two entries were pure duplicates of Central. They added no availability, only failure modes

Correction (added after merge). An earlier draft of this description said nothing was ever resolved from them. That is wrong. Because they were listed first, Maven attributed the downloads to them: a local cache built before this change records 2973 artifacts against scala-tools.releases and 850 against org.sonatype.oss.groups.public (e.g. jackson-bom-2.18.7.pom>scala-tools.releases= in _remote.repositories). Since both are redirects to Central the bytes came from Central either way, and the cold-cache verification below shows everything still resolves with them gone — so the removal stands. One practical consequence: an existing local cache carries those stamps, so mvn -o offline builds fail until one online run per goal re-stamps them with >central=, after which offline works again. — and one of those failure modes is real: from GitHub Actions runners the same host returns 403 Forbidden, which killed a build outright.

Could not transfer artifact org.slf4j:slf4j-api:pom:1.7.36
  from/to scala-tools.releases (https://oss.sonatype.org/content/repositories/releases/)
  status code: 403, reason phrase: Forbidden

It failed intermittently rather than always, which is what made it hard to attribute: Maven consults a remote repository only when a POM is not already in the local cache. A warm runner never touched it; a cold one failed the whole build before a single test ran. The same commit passed in one CI run and failed in the next, on a shard unrelated to anything that had changed (code.api.v1_2_1).

<pluginRepositories> contained only the dead entry, so the block goes with it; Maven consults Central for plugins by default.

Kept, because they are load-bearing and are not Central duplicates: git-OpenBankProject (OBP’s own published artifacts) and jitpack.io (the pinned lift-persistence build).

Verification

A warm cache cannot demonstrate this either way, so everything below ran against an empty local repository (-Dmaven.repo.local on a fresh directory), with no mirror rewriting in ~/.m2/settings.xml:

dependency:go-offline -pl obp-api -am compile
Result BUILD SUCCESS BUILD SUCCESS
Requests to oss.sonatype.org 0 0
Unresolved artifacts 0
Plugin resolution failures 0
Downloaded 2622 from Central, 12 from JitPack (773 MB total)

The compile step matters specifically because it exercises the plugin set, which is what the removed <pluginRepositories> block would have served. The reactor is obp-commons + obp-api, so both modules are covered.

CI: 27/27 green, including test (2, v1_2_1) — the shard that the 403 had killed.

Not covered, stated for completeness: profiles that are not activated by default, and the mvn deploy / release path.

oss.sonatype.org was retired and now answers 403 to everything, so the two
repositories pointing at it could only ever fail. They did so intermittently
rather than always, which is what made this hard to attribute: Maven consults
a remote repository only when a POM is not already in the local cache, so a
warm runner never touched them while a cold one failed the whole build before
a single test ran. The same commit passed in one CI run and failed in the
next, on a shard unrelated to anything that had changed.

Nothing was ever resolved from them. Verified by resolving the full reactor,
and then compiling it, against an empty local repository with both removed:
BUILD SUCCESS, 2622 artifacts from Central and 12 from JitPack, zero requests
to the dead host and zero unresolved artifacts or plugins.

pluginRepositories contained only the dead entry, so the block goes with it;
Maven consults Central for plugins by default, which the cold compile
exercised.

The two repositories that remain are load-bearing: git-OpenBankProject serves
OBP's own published artifacts and jitpack.io serves the pinned
lift-persistence build.
@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

@hongwei1
hongwei1 merged commit 3fdb592 into develop-obp Aug 9, 2026
27 checks passed
@hongwei1
hongwei1 deleted the fix/drop-dead-sonatype-repos branch August 9, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant