Archiva (archiva.wikimedia.org) is intermittently returning HTTP 504 Gateway Timeout responses, breaking production Maven builds across WMF JVM projects.
Why 504 is worse than a slow Archiva
Maven treats any 5xx response from a configured repository as a hard "transfer failure" and does *not* fall through to other repositories (e.g. Maven Central). This means that when Archiva 504s on an artifact it does not even host — such as org.apache.spark:spark-sql, io.circe:circe-core, or org.scalatest:scalatest — Maven marks those artifacts as unresolvable and the entire build fails, even though they are available on Maven Central.
A 404 (artifact not here) would be harmless; Maven would move on to the next repository. A 504 is not.
Additionally, Maven caches the failure in a .lastUpdated marker file in the local repository. This means developer builds stay broken even after Archiva recovers — developers must manually purge ~/.m2/**/*.lastUpdated to unblock themselves.
Impact
- Production CI builds fail whenever Archiva 504s, including for modules with no dependency on any Archiva-hosted artifact — the 504 poisons the resolution of unrelated Central artifacts.
- Developer local builds stay broken after an incident until .lastUpdated files are manually purged.
- The wmf-jvm-parent-pom injects repository references inherited by all WMF JVM projects, so the blast radius of an Archiva outage extends beyond projects that directly configure Archiva repos.