From bb78dd1df60dba55450becde46907a95237fb4df Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 1 Sep 2026 07:57:43 -0500 Subject: [PATCH 1/5] Add java/cuopt/.mvn/maven.config to reduce Maven Central rate-limiting java-static-test has repeatedly hit 429 Too Many Requests resolving plugins like maven-source-plugin from a cold repository -- the cuopt_mvn wrapper's retry loop (fixed in #1823) retries the whole mvn invocation with backoff, but that's compensating for Maven's own resolver never being tuned, and 4 attempts don't reliably outlast a sustained rate limit. cuDF and cuVS already carry this exact fix for their own Java/Maven Central builds: a project-level .mvn/maven.config (auto-applied to every mvn invocation, no wrapper needed) that caps concurrent downloads to reduce burst request rate and adds a real backoff inside Maven's own transport-layer retry handler, rather than only retrying around the outside of a failed process: -Daether.connector.basic.downstreamThreads=1 -Daether.transport.http.retryHandler.count=5 -Daether.transport.http.retryHandler.interval=10000 -Dmaven.wagon.http.retryHandler.count=5 cuopt_mvn's own -D flags target the connector-layer retry handler, which recent Maven resolver versions may no longer consult now that retry logic lives at the transport layer -- this adds the layer that actually gets read, verified via `mvn help:evaluate -Dexpression=aether.transport.http.retryHandler.interval` resolving to 10000. Verified the packaged-jar-tests suite still passes with this config present. --- java/cuopt/.mvn/maven.config | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 java/cuopt/.mvn/maven.config diff --git a/java/cuopt/.mvn/maven.config b/java/cuopt/.mvn/maven.config new file mode 100644 index 0000000000..c83cb17ff4 --- /dev/null +++ b/java/cuopt/.mvn/maven.config @@ -0,0 +1,6 @@ +-e +-B +-Daether.connector.basic.downstreamThreads=1 +-Daether.transport.http.retryHandler.count=5 +-Daether.transport.http.retryHandler.interval=10000 +-Dmaven.wagon.http.retryHandler.count=5 From e2facf80b5ac67165ba6ad9ddc7495008d4fc3f9 Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 1 Sep 2026 10:08:42 -0500 Subject: [PATCH 2/5] Fix build.sh Java build to cd into java/cuopt before invoking mvn java/cuopt/.mvn/maven.config is only auto-discovered when Maven's directory search (which walks up from the current working directory, not from -f's directory) reaches java/cuopt. build.sh invoked cuopt_mvn with -f but never changed into that directory, so the transport-layer retry/backoff settings added for the Maven Central 429 rate-limiting never took effect. test.sh already cd's into MODULE_DIR for the same reason; mirror that here, matching how cuDF cd's into java/ before its mvn calls for the same .mvn/maven.config. Co-Authored-By: Claude Sonnet 5 --- build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 141c104357..98a0d30e1d 100755 --- a/build.sh +++ b/build.sh @@ -505,7 +505,10 @@ if hasArg java; then bash "${REPODIR}"/java/cuopt/scripts/build_native.sh source "${REPODIR}"/java/cuopt/scripts/maven.sh cuopt_maven_args - cuopt_mvn -f "${REPODIR}"/java/cuopt/pom.xml clean package \ + # cd into java/cuopt so Maven's directory-search picks up java/cuopt/.mvn/maven.config -- + # it walks up from the current working directory, not from -f's directory. + cd "${REPODIR}"/java/cuopt + cuopt_mvn -f pom.xml clean package \ -DskipTests \ -Dcuopt.native.dir="${CUOPT_JAVA_NATIVE_BUILD_DIR}" fi From af54fa71c4432d8dbfecd6c1851a76a2782e45e2 Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 1 Sep 2026 11:33:33 -0500 Subject: [PATCH 3/5] Only attach source/javadoc jars behind an opt-in profile, not on every mvn test/verify maven-source-plugin and maven-javadoc-plugin were declared unconditionally in , so every `mvn test`/`verify` invocation -- including ci/test_java.sh's, which never packages anything for publishing -- still had to resolve maven-source-plugin:3.3.1 from Maven Central on every run. That's the same artifact that's repeatedly failed on 429 in the java-static-test investigation on #1818, and there's no reason java-build's plain test path should pay for it either. No script on this branch currently packages a JAR for real publishing (only java/cuopt/scripts/test.sh's `mvn verify`, for testing, and build.sh's `mvn clean package`, for local dev -- neither needs sources/javadoc jars), so nothing needs the new attach-source-javadoc profile activated; this is a pure reduction in unnecessary Maven Central resolution. Verified locally: `mvn compile` no longer resolves maven-source-plugin/maven-javadoc-plugin at all (checked via -X debug output). --- java/cuopt/pom.xml | 82 ++++++++++++++++++++++++++++------------------ 1 file changed, 50 insertions(+), 32 deletions(-) diff --git a/java/cuopt/pom.xml b/java/cuopt/pom.xml index 019cc08433..bdec083385 100644 --- a/java/cuopt/pom.xml +++ b/java/cuopt/pom.xml @@ -109,38 +109,6 @@ SPDX-License-Identifier: Apache-2.0 - - - org.apache.maven.plugins - maven-source-plugin - 3.3.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.11.2 - - - none - - - - attach-javadocs - - jar - - - - org.apache.maven.plugins maven-surefire-plugin @@ -154,4 +122,54 @@ SPDX-License-Identifier: Apache-2.0 + + + + + attach-source-javadoc + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.2 + + + none + + + + attach-javadocs + + jar + + + + + + + + From 7f776e82c405a6fe2a2de8957e06458b54af269a Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 1 Sep 2026 16:13:08 -0500 Subject: [PATCH 4/5] Correct Maven retry property namespace to aether.connector.http.retryHandler.* The aether.transport.http.retryHandler.* properties (copied from cuDF/cuVS) are not read by Maven Resolver's 429/503 backoff feature; per the resolver's own ConfigurationProperties source (MRESOLVER-396, PREFIX_CONNECTOR), the correct namespace is aether.connector.http.retryHandler.*. Verified via mvn help:evaluate that these values actually resolve. --- java/cuopt/.mvn/maven.config | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/cuopt/.mvn/maven.config b/java/cuopt/.mvn/maven.config index c83cb17ff4..fb1e5b65cf 100644 --- a/java/cuopt/.mvn/maven.config +++ b/java/cuopt/.mvn/maven.config @@ -1,6 +1,8 @@ -e -B -Daether.connector.basic.downstreamThreads=1 --Daether.transport.http.retryHandler.count=5 --Daether.transport.http.retryHandler.interval=10000 +-Daether.connector.http.retryHandler.count=8 +-Daether.connector.http.retryHandler.interval=5000 +-Daether.connector.http.retryHandler.intervalMax=60000 +-Daether.connector.http.retryHandler.serviceUnavailable=429,503 -Dmaven.wagon.http.retryHandler.count=5 From 82e4e86e6c3f9e73b7f7d02f31b4cc9a87e1b4d5 Mon Sep 17 00:00:00 2001 From: Ramakrishna Prabhu Date: Tue, 1 Sep 2026 19:52:08 -0500 Subject: [PATCH 5/5] Prefer the GCS Maven Central mirror over repo.maven.apache.org NVIDIA-managed GitHub Actions runners egress through a small, shared NAT'd IP range, so every RAPIDS repo's Java CI shares the same rate-limit budget against Maven Central (rapidsai/build-infra#370): cuDF, cuVS, cuVS-lucene, and kvikio have all hit the same 429s we're seeing on exec-maven-plugin. kvikio#992 fixed it there by preferring the read-only GCS mirror of Central (the same one Apache ORC/Lucene/Spark use) with Central as fallback. Applying the same fix here. Verified locally: every plugin, including exec-maven-plugin, now resolves from the GCS mirror. --- java/cuopt/pom.xml | 57 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/java/cuopt/pom.xml b/java/cuopt/pom.xml index bdec083385..d214cf603c 100644 --- a/java/cuopt/pom.xml +++ b/java/cuopt/pom.xml @@ -45,6 +45,63 @@ SPDX-License-Identifier: Apache-2.0 5.11.4 + + + + gcs-maven-central-mirror + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + central + Maven Central + https://repo.maven.apache.org/maven2 + + true + + + false + + + + + + + gcs-maven-central-mirror + GCS Maven Central mirror + https://maven-central.storage-download.googleapis.com/maven2/ + + true + + + false + + + + central + Maven Plugin Repository + https://repo.maven.apache.org/maven2 + + true + + + false + + + + org.junit.jupiter