Skip to content

java: use GCS mirror for Maven Central, other small changes#22969

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
jameslamb:fix/java-builds
Jun 24, 2026
Merged

java: use GCS mirror for Maven Central, other small changes#22969
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
jameslamb:fix/java-builds

Conversation

@jameslamb

Copy link
Copy Markdown
Member

Description

Contributes to rapidsai/build-planning#297

Follow-up to #22875

Java CI on projects using NVIDIA's hosted GitHub Actions runners have been getting rate-limited by Maven Central. Similar to NVIDIA/cuvs#2253, this proposes fixing that by using the same read-only Maven mirror that Apache Orc, Lucene, Spark and others use in their builds (https://storage-download.googleapis.com/maven-central/index.html).

#22875 did that by adding a custom settings.xml and passing it to mvn -s. This moves those settings in to the project's pom.xml so it'll affect all mvn invocations, not just that script.

Other changes:

  • adding default mvn options to request packages more slowly and wait longer between retries
  • adds check-xml pre-commit hook to validate that pom.xml is valid XML
  • other minor pom.xml cleanup (see comments)

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@jameslamb jameslamb added Java Affects Java cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jun 24, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Comment thread java/pom.xml
<junit.version>5.4.2</junit.version>
<ai.rapids.refcount.debug>false</ai.rapids.refcount.debug>
<ai.rapids.cudf.nvtx.enabled>false</ai.rapids.cudf.nvtx.enabled>
<native.build.path>${basedir}/target/cmake-build</native.build.path>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is overridden a few lines down in this same block... think it's a left-behind duplicate that can be removed.

Comment thread java/pom.xml
Comment on lines -335 to -345
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is just unused... oss.sonatype.org was shut down.

$ curl -I https://oss.sonatype.org
HTTP/2 404

https://central.sonatype.org/pages/ossrh-eol/

I've seen that other release pipelines around RAPIDS don't use mvn deploy anyway, they directly hit the Sonatype API's upload endpoint. See NVIDIA/cuvs#2253 (comment)

Comment thread java/pom.xml
<plugin>
<artifactId>maven-exec-plugin</artifactId>
<version>1.6.0</version>
</plugin>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no matching entry for this in <plugins>, so I suspect we don't need one here in <pluginManagement>.

@jameslamb

Copy link
Copy Markdown
Member Author

/ok to test

Comment thread java/.mvn/maven.config
-Daether.connector.basic.downstreamThreads=1
-Daether.transport.http.retryHandler.count=5
-Daether.transport.http.retryHandler.interval=10000
-Dmaven.wagon.http.retryHandler.count=5

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See NVIDIA/cuvs#2253 (comment) for an explanation of these flags.

I believe comments are not allowed in this file because its contents are passed literally to mvn.

@jameslamb jameslamb changed the title WIP: java: use GCS mirror for Maven Central, other small changes java: use GCS mirror for Maven Central, other small changes Jun 24, 2026
@jameslamb jameslamb marked this pull request as ready for review June 24, 2026 17:59
@jameslamb jameslamb requested review from a team as code owners June 24, 2026 17:59
@jameslamb jameslamb requested a review from bdice June 24, 2026 17:59
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c7392fe7-f9f9-4655-8e45-7d710e5d9e77

📥 Commits

Reviewing files that changed from the base of the PR and between 0a3e194 and 458c432.

📒 Files selected for processing (5)
  • .pre-commit-config.yaml
  • ci/test_java.sh
  • java/.mvn/maven.config
  • java/ci/test_java_settings.xml
  • java/pom.xml
💤 Files with no reviewable changes (1)
  • java/ci/test_java_settings.xml

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Updated build and test configuration for Java to use more reliable Maven defaults and retry behavior.
    • Adjusted repository lookup settings to better find dependencies during builds.
    • Added a pre-commit check to validate XML files.
    • Updated copyright and attribution text in build/test tooling.

Walkthrough

The PR migrates Maven mirror configuration from a CI-specific settings.xml file into pom.xml repository entries and a new java/.mvn/maven.config file containing batch mode, exception, and HTTP retry flags. The CI script no longer passes -s ci/test_java_settings.xml. A check-xml pre-commit hook is also added, and two copyright lines are updated.

Changes

Maven Mirror Configuration Migration and CI Hardening

Layer / File(s) Summary
Inline Maven mirror repos and add retry config
java/pom.xml, java/.mvn/maven.config, java/ci/test_java_settings.xml
pom.xml gains <repositories> and <pluginRepositories> blocks preferring the GCS Maven Central mirror (releases, no snapshots) with Maven Central as fallback. New maven.config enables -e, -B, and Aether/Wagon HTTP retry system properties. The old test_java_settings.xml mirror block is removed entirely.
Remove explicit settings file from CI test invocation
ci/test_java.sh
The mvn test command drops the -s ci/test_java_settings.xml argument, relying on the new in-tree repository and maven.config configuration instead.
Add check-xml pre-commit hook and copyright updates
.pre-commit-config.yaml, ci/test_java.sh, java/pom.xml
Adds the check-xml hook to .pre-commit-config.yaml. Updates SPDX copyright headers in ci/test_java.sh and java/pom.xml to include "& AFFILIATES".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • rapidsai/cudf#22875: Directly overlaps — that PR introduced the GCS mirror in test_java_settings.xml and the -s flag in ci/test_java.sh, which this PR replaces with inline pom.xml repository configuration.

Suggested labels

3 - Ready for Review

Suggested reviewers

  • gforsyth
  • bdice
  • ttnghia
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main Maven mirror change and mentions the smaller follow-up edits.
Description check ✅ Passed The description matches the PR's Maven mirror migration and related build/config cleanup.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@jameslamb

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit cc69920 into rapidsai:main Jun 24, 2026
101 checks passed
@jameslamb jameslamb deleted the fix/java-builds branch June 24, 2026 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvement / enhancement to an existing function Java Affects Java cuDF API. non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants