Skip to content

ci: fall back to Maven Central when the mirror lacks an artifact - #27619

Open
vaadin-bot wants to merge 1 commit into
mainfrom
ci/central-fallback
Open

vaadin-bot wants to merge 1 commit into
mainfrom
ci/central-fallback

Conversation

@vaadin-bot

@vaadin-bot vaadin-bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Follow-up to #27418, which resolved Maven Central through Google's mirror by configuring the mirror as a <mirror> of central. Google syncs from Central with a delay, and a mirror replaces Central completely, so an artifact released minutes earlier fails to resolve. This hit flow-components (vaadin/flow-components#10900), which uses the same settings: com.vaadin:vaadin-testbench-shared:25.4.0-rc1 was on Central at 10:55 UTC, the run at 11:06 UTC failed with Could not find artifact ... in central (https://maven-central.storage-download.googleapis.com/maven2/), and the mirror still answered 404 at about 11:30 UTC.

  • Replaced the central <mirror> in .github/maven/settings.xml with a repository and plugin repository google-maven-central in an always-active settings profile
    • Maven tries settings profile repositories first, then the pom repositories, and Central (from the super pom) last, so the mirror still serves almost everything and Central only gets the artifacts the mirror does not have yet
    • Snapshots are disabled for the mirror so that snapshot lookups never go there
    • Artifacts already in the cached ~/.m2/repository under the id central stay valid, because central is still one of the repositories
  • Kept the JBoss mirror as it was
  • The workflows are unchanged, as they already pass the file with -gs
  • The Gradle init script .github/gradle/central-mirror.init.gradle still replaces the Central URL with the mirror, so Gradle builds have the same weakness. It is not changed here

Verified locally with Maven 3.9.5, an empty local repository and a pom that declares vaadin-prereleases: vaadin-testbench-shared:25.4.0-rc1 was requested from google-maven-central (404), then vaadin-prereleases (404), then downloaded from central. Plugins were downloaded from google-maven-central, and a second run downloaded nothing.

Same change in flow-components: vaadin/flow-components#10902

Type of change

  • Internal change

🤖 Generated with Claude Code

Google's mirror of Maven Central syncs with a delay, so an artifact released
minutes ago is not there yet. With the mirror configured as a <mirror> of
central, Maven never asked Central itself and the build failed. Add the mirror
as a repository in an active settings profile instead, so it is tried first
and Maven falls back to the pom repositories and to Central on a 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZheSun88
ZheSun88 requested a review from caalador December 2, 2026 11:46
@github-actions github-actions Bot added the +0.0.1 label Dec 2, 2026
@sonarqubecloud

sonarqubecloud Bot commented Dec 2, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 656 files  ±0   1 747 suites  ±0   1h 49m 48s ⏱️ + 11m 10s
14 094 tests ±0  14 022 ✅ ±0  72 💤 ±0  0 ❌ ±0 
14 520 runs  ±0  14 448 ✅ ±0  72 💤 ±0  0 ❌ ±0 

Results for commit 73bc1ef. ± Comparison against base commit e248423.

@caalador

caalador commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

The google-maven-central id makes the vaadin-quarkus unit tests download from Central again. I reproduced it locally.

The old mirror was kept under the id central on purpose. Maven records which repository each cached file came from, and only trusts a cached file if that repository is configured for the current build. With this change, files are recorded only as google-maven-central, and some resolvers in CI can't see that repository.

The QuarkusUnitTest tests in vaadin-quarkus/deployment run in the unit-tests job. Inside the test JVM, Quarkus resolves the application's dependencies with its own resolver, which never sees this settings file:

  • It reads -s/-gs from the MAVEN_CMD_LINE_ARGS environment variable (BootstrapMavenOptions.getMavenCmdLine()), or from the quarkus-internal.maven-cmd-line-args system property.
  • The mvn script sets MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@", which leaves out MAVEN_ARGS. validation.yml passes -gs only through MAVEN_ARGS.
  • It then uses $MAVEN_HOME/conf/settings.xml (BootstrapMavenContext.getGlobalSettings()), so google-maven-central isn't one of its repositories, and it ignores files recorded only under that id.

How I reproduced it, on this PR's commit with an empty local repository and MAVEN_ARGS="-gs .github/maven/settings.xml":

  1. mvn test-compile -pl vaadin-quarkus/deployment: 1,431 files were downloaded from google-maven-central and recorded only under that id.
  2. mvn test -pl vaadin-quarkus/deployment: after T E S T S, the test JVM logged 831 Downloading from central: https://repo.maven.apache.org/... requests (322 of them jars) for files that were already cached. 509 cache entries now list both central and google-maven-central, for example quarkus-core-deployment-3.40.2.jar.

CI doesn't show this yet because the current cache was built when the mirror's id was central. Once the cache is rebuilt with this settings file, or Quarkus is bumped, the unit-tests slot that runs vaadin-quarkus/deployment will send those requests to Central, which brings back the 429 risk.

Possible fixes:

  • Pass quarkus-internal.maven-cmd-line-args=-gs <path> to Surefire in vaadin-quarkus/deployment. This works, but the property is Quarkus-internal.
  • Put the profile in the user settings (~/.m2/settings.xml), which Quarkus reads by default, instead of the -gs file.

Side note: Central is also asked for plugin version lists that the poms don't pin. Locally, japicmp-maven-plugin's maven-metadata.xml came from Central. This is minor, but it's an exception to "Central only gets what the mirror lacks".

sissbruecker added a commit to vaadin/flow-components that referenced this pull request Dec 2, 2026
…10902) (CP: 25.4) (#10907)

This PR cherry-picks changes from the original PR #10902 to branch 25.4.

---

> ## Description
> 
> Follow-up to #10886, which resolved Maven Central through Google's
mirror by configuring the mirror as a `<mirror>` of `central`. Google
syncs from Central with a delay, and a mirror replaces Central
completely, so an artifact released minutes earlier fails to resolve.
This happened in #10900: `com.vaadin:vaadin-testbench-shared:25.4.0-rc1`
was on Central at 10:55 UTC, the run at 11:06 UTC failed with `Could not
find artifact ... in central
(https://maven-central.storage-download.googleapis.com/maven2/)`, and
the mirror still answered 404 at about 11:30 UTC.
> 
> - Replaced the `<mirror>` in `.github/maven/settings.xml` with a
repository and plugin repository `google-maven-central` in an
always-active settings profile
> - Maven tries settings profile repositories first, then the pom
repositories, and Central (from the super pom) last, so the mirror still
serves almost everything and Central only gets the artifacts the mirror
does not have yet
> - Snapshots are disabled for the mirror so that snapshot lookups never
go there
> - Artifacts already in the cached `~/.m2/repository` under the id
`central` stay valid, because `central` is still one of the repositories
> - The workflows are unchanged, as they already pass the file with
`-gs`
> 
> Verified locally with Maven 3.9.5, an empty local repository and a pom
that declares `vaadin-prereleases`: `vaadin-testbench-shared:25.4.0-rc1`
was requested from `google-maven-central` (404), then
`vaadin-prereleases` (404), then downloaded from `central`. Plugins were
downloaded from `google-maven-central`, and a second run downloaded
nothing.
> 
> Same change in Flow: vaadin/flow#27619
> 
> ## Type of change
> 
> - Internal change
> 
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
>

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
vaadin-bot added a commit to vaadin/flow-components that referenced this pull request Dec 2, 2026
…10902) (CP: 24.7) (#10911)

This PR cherry-picks changes from the original PR #10902 to branch 24.7.

---

> ## Description
> 
> Follow-up to #10886, which resolved Maven Central through Google's
mirror by configuring the mirror as a `<mirror>` of `central`. Google
syncs from Central with a delay, and a mirror replaces Central
completely, so an artifact released minutes earlier fails to resolve.
This happened in #10900: `com.vaadin:vaadin-testbench-shared:25.4.0-rc1`
was on Central at 10:55 UTC, the run at 11:06 UTC failed with `Could not
find artifact ... in central
(https://maven-central.storage-download.googleapis.com/maven2/)`, and
the mirror still answered 404 at about 11:30 UTC.
> 
> - Replaced the `<mirror>` in `.github/maven/settings.xml` with a
repository and plugin repository `google-maven-central` in an
always-active settings profile
> - Maven tries settings profile repositories first, then the pom
repositories, and Central (from the super pom) last, so the mirror still
serves almost everything and Central only gets the artifacts the mirror
does not have yet
> - Snapshots are disabled for the mirror so that snapshot lookups never
go there
> - Artifacts already in the cached `~/.m2/repository` under the id
`central` stay valid, because `central` is still one of the repositories
> - The workflows are unchanged, as they already pass the file with
`-gs`
> 
> Verified locally with Maven 3.9.5, an empty local repository and a pom
that declares `vaadin-prereleases`: `vaadin-testbench-shared:25.4.0-rc1`
was requested from `google-maven-central` (404), then
`vaadin-prereleases` (404), then downloaded from `central`. Plugins were
downloaded from `google-maven-central`, and a second run downloaded
nothing.
> 
> Same change in Flow: vaadin/flow#27619
> 
> ## Type of change
> 
> - Internal change
> 
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
>

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
vaadin-bot added a commit to vaadin/flow-components that referenced this pull request Dec 2, 2026
…10902) (CP: 24.4) (#10912)

This PR cherry-picks changes from the original PR #10902 to branch 24.4.

---

> ## Description
> 
> Follow-up to #10886, which resolved Maven Central through Google's
mirror by configuring the mirror as a `<mirror>` of `central`. Google
syncs from Central with a delay, and a mirror replaces Central
completely, so an artifact released minutes earlier fails to resolve.
This happened in #10900: `com.vaadin:vaadin-testbench-shared:25.4.0-rc1`
was on Central at 10:55 UTC, the run at 11:06 UTC failed with `Could not
find artifact ... in central
(https://maven-central.storage-download.googleapis.com/maven2/)`, and
the mirror still answered 404 at about 11:30 UTC.
> 
> - Replaced the `<mirror>` in `.github/maven/settings.xml` with a
repository and plugin repository `google-maven-central` in an
always-active settings profile
> - Maven tries settings profile repositories first, then the pom
repositories, and Central (from the super pom) last, so the mirror still
serves almost everything and Central only gets the artifacts the mirror
does not have yet
> - Snapshots are disabled for the mirror so that snapshot lookups never
go there
> - Artifacts already in the cached `~/.m2/repository` under the id
`central` stay valid, because `central` is still one of the repositories
> - The workflows are unchanged, as they already pass the file with
`-gs`
> 
> Verified locally with Maven 3.9.5, an empty local repository and a pom
that declares `vaadin-prereleases`: `vaadin-testbench-shared:25.4.0-rc1`
was requested from `google-maven-central` (404), then
`vaadin-prereleases` (404), then downloaded from `central`. Plugins were
downloaded from `google-maven-central`, and a second run downloaded
nothing.
> 
> Same change in Flow: vaadin/flow#27619
> 
> ## Type of change
> 
> - Internal change
> 
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
>

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
vaadin-bot added a commit to vaadin/flow-components that referenced this pull request Dec 2, 2026
…10902) (CP: 24.9) (#10910)

This PR cherry-picks changes from the original PR #10902 to branch 24.9.

---

> ## Description
> 
> Follow-up to #10886, which resolved Maven Central through Google's
mirror by configuring the mirror as a `<mirror>` of `central`. Google
syncs from Central with a delay, and a mirror replaces Central
completely, so an artifact released minutes earlier fails to resolve.
This happened in #10900: `com.vaadin:vaadin-testbench-shared:25.4.0-rc1`
was on Central at 10:55 UTC, the run at 11:06 UTC failed with `Could not
find artifact ... in central
(https://maven-central.storage-download.googleapis.com/maven2/)`, and
the mirror still answered 404 at about 11:30 UTC.
> 
> - Replaced the `<mirror>` in `.github/maven/settings.xml` with a
repository and plugin repository `google-maven-central` in an
always-active settings profile
> - Maven tries settings profile repositories first, then the pom
repositories, and Central (from the super pom) last, so the mirror still
serves almost everything and Central only gets the artifacts the mirror
does not have yet
> - Snapshots are disabled for the mirror so that snapshot lookups never
go there
> - Artifacts already in the cached `~/.m2/repository` under the id
`central` stay valid, because `central` is still one of the repositories
> - The workflows are unchanged, as they already pass the file with
`-gs`
> 
> Verified locally with Maven 3.9.5, an empty local repository and a pom
that declares `vaadin-prereleases`: `vaadin-testbench-shared:25.4.0-rc1`
was requested from `google-maven-central` (404), then
`vaadin-prereleases` (404), then downloaded from `central`. Plugins were
downloaded from `google-maven-central`, and a second run downloaded
nothing.
> 
> Same change in Flow: vaadin/flow#27619
> 
> ## Type of change
> 
> - Internal change
> 
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
>

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
vaadin-bot added a commit to vaadin/flow-components that referenced this pull request Dec 2, 2026
…10902) (CP: 24.10) (#10909)

This PR cherry-picks changes from the original PR #10902 to branch
24.10.

---

> ## Description
> 
> Follow-up to #10886, which resolved Maven Central through Google's
mirror by configuring the mirror as a `<mirror>` of `central`. Google
syncs from Central with a delay, and a mirror replaces Central
completely, so an artifact released minutes earlier fails to resolve.
This happened in #10900: `com.vaadin:vaadin-testbench-shared:25.4.0-rc1`
was on Central at 10:55 UTC, the run at 11:06 UTC failed with `Could not
find artifact ... in central
(https://maven-central.storage-download.googleapis.com/maven2/)`, and
the mirror still answered 404 at about 11:30 UTC.
> 
> - Replaced the `<mirror>` in `.github/maven/settings.xml` with a
repository and plugin repository `google-maven-central` in an
always-active settings profile
> - Maven tries settings profile repositories first, then the pom
repositories, and Central (from the super pom) last, so the mirror still
serves almost everything and Central only gets the artifacts the mirror
does not have yet
> - Snapshots are disabled for the mirror so that snapshot lookups never
go there
> - Artifacts already in the cached `~/.m2/repository` under the id
`central` stay valid, because `central` is still one of the repositories
> - The workflows are unchanged, as they already pass the file with
`-gs`
> 
> Verified locally with Maven 3.9.5, an empty local repository and a pom
that declares `vaadin-prereleases`: `vaadin-testbench-shared:25.4.0-rc1`
was requested from `google-maven-central` (404), then
`vaadin-prereleases` (404), then downloaded from `central`. Plugins were
downloaded from `google-maven-central`, and a second run downloaded
nothing.
> 
> Same change in Flow: vaadin/flow#27619
> 
> ## Type of change
> 
> - Internal change
> 
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
>

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>
vaadin-bot added a commit to vaadin/flow-components that referenced this pull request Dec 2, 2026
…10902) (CP: 25.3) (#10908)

This PR cherry-picks changes from the original PR #10902 to branch 25.3.

---

> ## Description
> 
> Follow-up to #10886, which resolved Maven Central through Google's
mirror by configuring the mirror as a `<mirror>` of `central`. Google
syncs from Central with a delay, and a mirror replaces Central
completely, so an artifact released minutes earlier fails to resolve.
This happened in #10900: `com.vaadin:vaadin-testbench-shared:25.4.0-rc1`
was on Central at 10:55 UTC, the run at 11:06 UTC failed with `Could not
find artifact ... in central
(https://maven-central.storage-download.googleapis.com/maven2/)`, and
the mirror still answered 404 at about 11:30 UTC.
> 
> - Replaced the `<mirror>` in `.github/maven/settings.xml` with a
repository and plugin repository `google-maven-central` in an
always-active settings profile
> - Maven tries settings profile repositories first, then the pom
repositories, and Central (from the super pom) last, so the mirror still
serves almost everything and Central only gets the artifacts the mirror
does not have yet
> - Snapshots are disabled for the mirror so that snapshot lookups never
go there
> - Artifacts already in the cached `~/.m2/repository` under the id
`central` stay valid, because `central` is still one of the repositories
> - The workflows are unchanged, as they already pass the file with
`-gs`
> 
> Verified locally with Maven 3.9.5, an empty local repository and a pom
that declares `vaadin-prereleases`: `vaadin-testbench-shared:25.4.0-rc1`
was requested from `google-maven-central` (404), then
`vaadin-prereleases` (404), then downloaded from `central`. Plugins were
downloaded from `google-maven-central`, and a second run downloaded
nothing.
> 
> Same change in Flow: vaadin/flow#27619
> 
> ## Type of change
> 
> - Internal change
> 
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
>

Co-authored-by: Zhe Sun <zhe@vaadin.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Sascha Ißbrücker <sissbruecker@vaadin.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants