Skip to content

Introduce validation control#12520

Open
cstamas wants to merge 2 commits into
apache:masterfrom
cstamas:validation-control
Open

Introduce validation control#12520
cstamas wants to merge 2 commits into
apache:masterfrom
cstamas:validation-control

Conversation

@cstamas

@cstamas cstamas commented Jul 22, 2026

Copy link
Copy Markdown
Member

Enables validation level choice in Maven Resolver validator.

This change should go to every Maven version having MavenValidator (3.10, 4.0 and 4.1).

Related: apache/maven-resolver#2007

This config is sourced from Java System Properties, as there
is no access to session.

Enables validation level in Maven Resolver validator.
@cstamas cstamas added this to the 4.1.0 milestone Jul 22, 2026
@cstamas cstamas self-assigned this Jul 22, 2026
@cstamas cstamas added the enhancement New feature or request label Jul 22, 2026
@cstamas
cstamas marked this pull request as ready for review July 22, 2026 13:12

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

Clean, well-scoped escape-hatch feature introducing configurable validation levels (maven.resolver.validation) for the Maven Resolver validator. The three levels (DEFAULT, MILD, OFF) are well-documented in Constants.java and accurately reflect the implementation. Default behavior is preserved, singleton pattern for validator instances is efficient, and the @since 3.10.0 tag is consistent with existing convention.

Two minor notes (non-blocking):

  • No unit tests for the new MavenValidator(boolean) constructor behavior — while the feature is simple, tests covering the three validation levels would improve confidence.
  • The ValidationLevel enum could be made package-private since MavenValidatorFactory is in the impl module.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants