From 2df690c4be112082b6b7dcfbdf29101d0f67136f Mon Sep 17 00:00:00 2001 From: Blake Gentry Date: Sun, 25 Oct 2026 09:21:10 -0500 Subject: [PATCH] [java] refresh cached Central prefixes An immutable CI archive can retain Maven Central's namespace index from before River's first release. Resolver can reuse that local metadata for the rest of the day, producing a warning that fails every Java build even when the published artifact is available and the build succeeds. Discard only Central's auto-discovered prefix index after restoring the Maven cache and before a Maven build loads it. Fetch current metadata on the next build while retaining dependency artifacts, user-defined filters, and the strict warning policy. --- .github/actions/setup-java/action.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/actions/setup-java/action.yaml b/.github/actions/setup-java/action.yaml index 709f5b3cf..ea54b9514 100644 --- a/.github/actions/setup-java/action.yaml +++ b/.github/actions/setup-java/action.yaml @@ -15,3 +15,13 @@ runs: java-version: ${{ inputs.java-version }} cache: maven cache-dependency-path: "java/**/pom.xml" + + # The immutable Maven cache also contains Central's mutable namespace index. + # Resolver can reuse that local index for the rest of the day, even after a + # new namespace is published, producing warnings that fail our strict policy. + # Remove only the auto-discovered Central index before any Maven build starts; + # its next process downloads a fresh index while retaining cached artifacts, + # user-defined filters, and our strict Maven warning policy. + - name: Refresh Maven Central repository prefixes + shell: bash + run: rm -f "$HOME/.m2/repository/.meta/prefixes-central.txt"