Skip to content

Route Maven through Moderne Artifactory cache to avoid HTTP 429 - #1096

Merged
Jenson3210 merged 3 commits into
mainfrom
jenson3210/route-maven-through-moderne-cache
May 13, 2026
Merged

Jenson3210 merged 3 commits into
mainfrom
jenson3210/route-maven-through-moderne-cache

Conversation

@Jenson3210

Copy link
Copy Markdown
Contributor

Summary

  • CI failed today with https://repo.maven.apache.org/maven2: HTTP 429 — Maven Central is rate-limiting parallel test resolution.
  • Inline the same mirror configuration that moderneinc/rewrite-java-security uses successfully today: route all Maven resolution through https://artifactory.moderne.ninja/artifactory/moderne-cache-3/ via s4u/maven-settings-action, and set REWRITE_GRADLE_MIRROR_* env vars on the Gradle build / publish steps.
  • Replaces the thin call into openrewrite/gh-automation's reusable ci-gradle.yml / publish-gradle.yml with their composite actions invoked inline — the bypass pattern the reusable workflow explicitly recommends for consumers that need a mirror.
  • Validated by the pilot PR moderneinc/rewrite-dropwizard#14, which built green in 4m16s with no 429s.

Test plan

  • PR CI passes
  • Build logs show s4u/maven-settings-action step ran
  • No HTTP 429 lines in build logs

Maven Central has started rate-limiting parallel test resolution
(HTTP 429), failing CI across recipe repos. Inline the same mirror
configuration used by moderneinc/rewrite-java-security: route
`mirrorOf: "*"` through artifactory.moderne.ninja's moderne-cache-3
via s4u/maven-settings-action, and set REWRITE_GRADLE_MIRROR_* on
the build/publish steps so Gradle resolution goes through the cache
too.

This replaces the call into openrewrite/gh-automation's reusable
ci-gradle.yml / publish-gradle.yml workflows with their composite
actions called inline, which is the bypass pattern the reusable
workflow explicitly recommends for consumers that need a mirror.
timtebeek added 2 commits May 13, 2026 10:38
The five other JSpecify recipes in this file pin to 1.0.0; this one
used `latest.release`, which now resolves to `1.0.0.redhat-00001`
through the Moderne Artifactory cache mirror, breaking
JSpecifyBestPracticesTest.
@Jenson3210
Jenson3210 merged commit f56a1ea into main May 13, 2026
1 check passed
@Jenson3210
Jenson3210 deleted the jenson3210/route-maven-through-moderne-cache branch May 13, 2026 23:39
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite May 13, 2026
timtebeek added a commit that referenced this pull request May 15, 2026
…1101)

`classpathFromResources("sun.internal.new")` uses
`Pattern.compile(artifactName + ".*")` to match against artifact-version
strings in both `META-INF/rewrite/classpath.tsv.gz` type tables and
JAR files under `META-INF/rewrite/classpath/`. Since `.` is a regex
wildcard, the prefix `sun.internal.new` can match unrelated artifacts,
and the static `TypeTable.classesDirByArtifact` cache can cause the
local JAR fallback to be skipped depending on test ordering and what
type tables happen to be on the runtime classpath.

After #1096 routed Maven resolution through Moderne's Artifactory
cache mirror, the four type-attribution-sensitive `IBMSemeruTest`
cases started failing on every scheduled CI run with "LST contains
missing or invalid type information". Loading the JAR directly via
`classpath(Collection<Path>)` and a `getResource` lookup bypasses
both the regex matching and the shared static cache, so the IBM
JSSE stub classes are always available to the parser.

Fixes #1100
mergify Bot added a commit to robfrank/linklift that referenced this pull request Jun 4, 2026
…34.0 to 3.36.0 [skip ci]

Bumps [org.openrewrite.recipe:rewrite-migrate-java](https://github.com/openrewrite/rewrite-migrate-java) from 3.34.0 to 3.36.0.
Release notes

*Sourced from [org.openrewrite.recipe:rewrite-migrate-java's releases](https://github.com/openrewrite/rewrite-migrate-java/releases).*

> 3.36.0
> ------
>
> What's Changed
> --------------
>
> * Move StringFormatted recipe from Java 17 upgrade to Java best practices by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1106](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1106)
> * Skip `IfElseIfConstructToSwitch` when a trailing non-`== null` binary check is present by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1109](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1109)
> * Skip `UseTextBlocks` when literal value matches its source by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1111](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1111)
> * Skip `UseMapOf` for `HashMap` subclasses like `LinkedHashMap` and `TreeMap` by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1113](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1113)
> * Skip `RenameUnderscoreIdentifier` on Kotlin and Groovy sources by [`@​MBoegers`](https://github.com/MBoegers) in [openrewrite/rewrite-migrate-java#1114](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1114)
> * Do not add `java.io.IO` import in `ReplaceSystemOutWithIOPrint` by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1118](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1118)
> * fix: do not replace lambda params with underscore when used as assignment target by [`@​darrencilia`](https://github.com/darrencilia) in [openrewrite/rewrite-migrate-java#1117](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1117)
> * Route WSS4J message.token classes to their real 2.x packages by [`@​Jenson3210`](https://github.com/Jenson3210) in [openrewrite/rewrite-migrate-java#1122](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1122)
> * Migrate `com.sun.xml.bind.marshaller.NamespacePrefixMapper` to `org.glassfish.jaxb.runtime.marshaller.NamespacePrefixMapper` by [`@​Jenson3210`](https://github.com/Jenson3210) in [openrewrite/rewrite-migrate-java#1121](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1121)
> * Fix `RefineSwitchCases` generating invalid guard on enum constant labels by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1124](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1124)
> * Skip unparseable Java versions in FindJavaVersion instead of reporting -1 by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1125](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1125)
>
> New Contributors
> ----------------
>
> * [`@​darrencilia`](https://github.com/darrencilia) made their first contribution in [openrewrite/rewrite-migrate-java#1117](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1117)
>
> **Full Changelog**: <openrewrite/rewrite-migrate-java@v3.35.0...v3.36.0>
>
> 3.35.0
> ------
>
> What's Changed
> --------------
>
> * Add `java.io.IO` import in `ReplaceSystemOutWithIOPrint` by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1093](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1093)
> * Skip `UseMapOf` when `put()` argument is a null literal by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1094](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1094)
> * Migrate JAXB XJC binding files declaring version 2.0/2.1/2.2 by [`@​MBoegers`](https://github.com/MBoegers) in [openrewrite/rewrite-migrate-java#1098](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1098)
> * Preserve explicit type arguments in MigrateCollections\* recipes by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1099](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1099)
> * Route Maven through Moderne Artifactory cache to avoid HTTP 429 by [`@​Jenson3210`](https://github.com/Jenson3210) in [openrewrite/rewrite-migrate-java#1096](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1096)
> * Load sun.internal.new[Class].jar directly to fix CI test failures by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1101](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1101)
> * Skip explicit type arguments containing wildcards in `UseVarForGenericMethodInvocations` by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1102](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1102)
> * Skip `var` when target type inference widens a generic argument by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1103](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1103)
> * Skip `IfElseIfConstructToSwitch` when `instanceof` types are missing by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1095](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1095)
> * Revert inline Maven mirror (now in gh-automation#95) by [`@​Jenson3210`](https://github.com/Jenson3210) in [openrewrite/rewrite-migrate-java#1104](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1104)
> * Aggregate FindJavaVersion to one row per repository by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1105](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1105)
>
> **Full Changelog**: <openrewrite/rewrite-migrate-java@v3.34.1...v3.35.0>
>
> v3.34.1
> -------
>
> What's Changed
> --------------
>
> * OpenRewrite [v8.81.6](https://github.com/openrewrite/rewrite/releases/tag/v8.81.6)
> * Refresh UpdateSdkManTest fixtures after SDKMAN CSV update by [`@​steve-aom-elliott`](https://github.com/steve-aom-elliott) in [openrewrite/rewrite-migrate-java#1073](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1073)
> * Add more static analysis recipes to java-best-practices by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1075](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1075)
> * OpenRewrite recipe best practices by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1074](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1074)
> * Add jspecify hyperlink by [`@​sullis`](https://github.com/sullis) in [openrewrite/rewrite-migrate-java#1076](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1076)
> * Skip `var` when reassignment relies on declared supertype by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1078](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1078)
> * Keep parentheses when renaming typed lambda parameter to underscore by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1082](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1082)
> * Document null-probing semantic differences in singleton migrations by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1081](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1081)
> * Skip main migration when referenced as static API by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1084](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1084)
> * Skip `Immutable*.copyOf` rewrite when argument is not a `Collection` by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1089](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1089)
> * Keep block body when refined switch arm contains an if statement by [`@​timtebeek`](https://github.com/timtebeek) in [openrewrite/rewrite-migrate-java#1088](https://redirect.github.com/openrewrite/rewrite-migrate-java/pull/1088)

... (truncated)


Commits

* [`d4df178`](openrewrite/rewrite-migrate-java@d4df178) Skip unparseable Java versions in FindJavaVersion instead of reporting -1 ([#1](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1)...
* [`b8a298e`](openrewrite/rewrite-migrate-java@b8a298e) Fix `RefineSwitchCases` generating invalid guard on enum constant labels ([#1124](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1124))
* [`c7f400b`](openrewrite/rewrite-migrate-java@c7f400b) [Auto] SDKMAN! Java candidates as of 2026-06-01T1550
* [`fca7c7c`](openrewrite/rewrite-migrate-java@fca7c7c) Migrate `com.sun.xml.bind.marshaller.NamespacePrefixMapper` to `org.glassfish...
* [`74017b2`](openrewrite/rewrite-migrate-java@74017b2) Route WSS4J message.token classes to their real 2.x packages ([#1122](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1122))
* [`52b0808`](openrewrite/rewrite-migrate-java@52b0808) OpenRewrite recipe best practices
* [`23e5804`](openrewrite/rewrite-migrate-java@23e5804) Update Gradle wrapper 9.5.1
* [`21548bd`](openrewrite/rewrite-migrate-java@21548bd) fix: do not replace lambda params with underscore when used as assignment tar...
* [`61e7d90`](openrewrite/rewrite-migrate-java@61e7d90) Do not add `java.io.IO` import in `ReplaceSystemOutWithIOPrint` ([#1118](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1118))
* [`dec86d0`](openrewrite/rewrite-migrate-java@dec86d0) Skip `RenameUnderscoreIdentifier` on Kotlin and Groovy sources ([#1114](https://redirect.github.com/openrewrite/rewrite-migrate-java/issues/1114))
* Additional commits viewable in [compare view](openrewrite/rewrite-migrate-java@v3.34.0...v3.36.0)
  
[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility\_score?dependency-name=org.openrewrite.recipe:rewrite-migrate-java&package-manager=maven&previous-version=3.34.0&new-version=3.36.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
  
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot show  ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants