Skip to content

Brings the Java build in line with other clients. - #2361

Open
imotov wants to merge 9 commits into
NVIDIA:mainfrom
imotov:issue-2131/fix-cuvs-java-build-issues
Open

Brings the Java build in line with other clients.#2361
imotov wants to merge 9 commits into
NVIDIA:mainfrom
imotov:issue-2131/fix-cuvs-java-build-issues

Conversation

@imotov

@imotov imotov commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Fixes several build issues that previously allowed improperly formatted files and files with incorrect copyright headers to pass CI.

  • Replaces the Java-specific copyright check with the standard pre-commit check.
  • Adds Java and Maven dependencies to the all configuration.
  • Moves formatting and Spotless checks into pre-commit.
  • Fixes formatting in files that were not properly formatted.
  • Removes the remaining headers_h_1 imports.

Fixes #2131

Fixes several build issues that previously allowed improperly formatted files and files with incorrect copyright headers to pass CI.
- Replaces the Java-specific copyright check with the standard pre-commit check.
- Adds Java and Maven dependencies to the all configuration.
- Moves formatting and Spotless checks into pre-commit.
- Fixes formatting in files that were not properly formatted.
- Removes the remaining headers_h_1 imports.

Fixes NVIDIA#2131
@imotov

imotov commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test cc91b0a

@copy-pr-bot

copy-pr-bot Bot commented Jul 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.

@imotov imotov added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jul 24, 2026
@imotov

imotov commented Jul 25, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 77df6c3

@imotov
imotov marked this pull request as ready for review July 25, 2026 02:08
@imotov
imotov requested review from a team as code owners July 25, 2026 02:08
@imotov
imotov requested a review from KyleFromNVIDIA July 25, 2026 02:08
Comment thread java/cuvs-java/pom.xml

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not be requiring everyone running pre-commit run --all-files on this repo to have Maven installed.

Please see my suggestions about that.

(leaving a non-blocking "comment" review because we have storms in my area today and I may lose internet... if you push changes and aren't getting a timely response from me, ask others for a adi-packaging-codeowners review)

Comment thread dependencies.yaml Outdated
Comment on lines +300 to +304
# spotless-fmt pre-commit hook requires Maven and a JDK
- output_types: [conda]
packages:
- maven
- openjdk=22.*

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
# spotless-fmt pre-commit hook requires Maven and a JDK
- output_types: [conda]
packages:
- maven
- openjdk=22.*
# spotless-fmt pre-commit hook requires Maven and a JDK
- output_types: [conda]
packages:
- maven
- &openjdk openjdk=22.*

Let's please avoid duplication here. This same version range is mentioned below:

- openjdk=22.*

Make this one a YAML anchor, and replace that one with *openjdk

Comment thread .pre-commit-config.yaml Outdated
language: rust
- id: spotless-fmt
name: spotless-fmt
entry: mvn --batch-mode --quiet -f java/cuvs-java/pom.xml spotless:apply

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is going to require everyone working on cuvs to have Maven installed locally to run pre-commit run --all-files.

I expect that most folks would not ... many RAPIDS developers and contributors to this project do not do anything involving Java.

Options I could see to avoid that:

I think the shell-script option would be preferable, can you please do that?

@imotov
imotov requested a review from a team as a code owner July 28, 2026 18:07
@imotov
imotov requested a review from jameslamb July 28, 2026 18:53

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Changes for my narrow comments look great, thanks for considering those!

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

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Java code format standard is not being enforced

3 participants