GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Maven 3.10.x should use Maven 3.1 validation in strict mode by gnodet · Pull Request #1542 · apache/maven

Conversation

@gnodet

@gnodet gnodet commented May 29, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Changes VALIDATION_LEVEL_STRICT from VALIDATION_LEVEL_MAVEN_3_0 (30) to VALIDATION_LEVEL_MAVEN_3_1 (31).

In strict mode (the default for project builds), the getSeverity(request, errorThreshold) method returns ERROR when validationLevel >= threshold and WARNING otherwise. By raising the strict level from 3.0 to 3.1, the following checks are promoted from warnings to errors:

  • Duplicate plugin declarations in build/plugins
  • Banned characters in version strings (e.g. backslash, expression fragments)
  • Unsupported snapshot version formats (non-standard SNAPSHOT qualifiers)
  • Banned characters in repository IDs
  • Reserved repository ID local

Additional warnings are now emitted for:

  • system scope dependency deprecation
  • Hard-coded system paths in systemPath
  • ${basedir}-relative system paths

The test resource duplicate-plugins-merged-pom.xml was updated to move the duplicate plugin into a profile (avoiding the raw validation error while still testing plugin merge behavior).

Unit tests updated to explicitly use VALIDATION_LEVEL_MAVEN_3_0 where the test exercises pre-3.1 behavior, and to use the default (now 3.1) level where the stricter validation is expected.

Companion IT PR: apache/maven-integration-testing#441

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

michael-o reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
cstamas
cstamas approved these changes May 29, 2024
View reviewed changes
@cstamas

cstamas commented May 29, 2024

Copy link
Copy Markdown
Member

Let's see CI, as it may have some quirks...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas cstamas modified the milestone: 3.9.8 Jun 5, 2024
@cstamas

cstamas commented Jun 5, 2024

Copy link
Copy Markdown
Member

Oups, not yet, these are IT failures...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gnodet gnodet added the mvn3 label Aug 29, 2024
@gnodet
gnodet marked this pull request as draft January 22, 2025 08:20
@gnodet
gnodet changed the base branch from maven-3.9.x to maven-3.10.x September 2, 2026 21:12
@gnodet gnodet added this to the 3.10.0 milestone Sep 2, 2026
@gnodet
gnodet requested review from cstamas and slawekjaranowski September 2, 2026 21:13
@gnodet
gnodet force-pushed the fix-validation-level branch 2 times, most recently from f92658b to 309feec Compare September 2, 2026 22:03
@gnodet
gnodet marked this pull request as ready for review September 2, 2026 22:17
@gnodet gnodet mentioned this pull request Sep 3, 2026
Update ITs for stricter validation in Maven 3.10.x (PR apache/maven#1542) apache/maven-integration-testing#441
Open
@gnodet

gnodet commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Companion IT PR: apache/maven-integration-testing#441

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cstamas
cstamas approved these changes Sep 16, 2026
View reviewed changes

@cstamas cstamas left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

But title mentions 3.9.x...

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
cstamas
cstamas approved these changes Sep 16, 2026
View reviewed changes
gnodet-bot
gnodet-bot reviewed Sep 19, 2026
View reviewed changes

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The test logic and constant change are sound. VALIDATION_LEVEL_STRICT = VALIDATION_LEVEL_MAVEN_3_1 is the right move for Maven 3.10.x — the 3.1 checks (duplicate plugins, bad version chars, bad snapshot format, bad/reserved repo IDs) have been stable since Maven 3.1 (2012), and promoting them to errors in a new minor is reasonable. The test split into *30 / default variants is clean and exhaustive.

One structural concern with duplicate-plugins-merged-pom.xml (see inline).

This review was generated by an AI agent, Hermès on behalf of @gnodet.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread maven-core/src/test/resources/projects/duplicate-plugins-merged-pom.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

gnodet-bot
gnodet-bot reviewed Sep 21, 2026
View reviewed changes

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Re-review after 7f77651

Previous finding — addressed ✅
The activeByDefault fragility I flagged is now fixed: the profile uses <activation><property><name>activateFooProfile</name></property></activation> (activated when the property is set, not silently deactivated by other profiles), and the test explicitly activates it via setActiveProfileIds(["foo"]). This makes testDuplicatePluginDefinitionsMerged environment-independent. Good fix.

Remaining issue — PR title is wrong
The title says "Maven 3.9.x should use Maven 3.1 validation in strict mode" but the PR targets the maven-3.10.x branch with milestone 3.10.0. 3.9.x is a distinct release line that is not the target of this change. The title should read something like "Maven 3.10.x should use Maven 3.1 validation in strict mode" (or simply "Raise VALIDATION_LEVEL_STRICT to VALIDATION_LEVEL_MAVEN_3_1 for Maven 3.10.x"). This was already noted by @cstamas and is still not updated.

Validator logic — verified ✅
The tests correctly reflect the validator's getSeverity logic:

  • validateBannedCharacters and validate20ProperSnapshotVersion use errOn31 → ERROR at 3.1 strict.
  • system scope deprecation warning fires unconditionally at >= 3.1 (not gated on errOn31), so testHardCodedSystemPath correctly expects 3 warnings (not errors) at strict level — the deprecation warning was new at 3.1 in the original validator, not promoted to an error.
  • All six test pairs (testDuplicatePlugin30/testDuplicatePlugin, testReservedRepositoryId30/testReservedRepositoryId, testBadVersion30/testBadVersion, testBadSnapshotVersion30/testBadSnapshotVersion, testBadRepositoryId30/testBadRepositoryId, testHardCodedSystemPath, testSystemPathRefersToProjectBasedir) are complete and consistent.

Please update the PR title before merge.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@gnodet gnodet changed the title Maven 3.9.x should use Maven 3.1 validation in strict mode Maven 3.10.x should use Maven 3.1 validation in strict mode Sep 21, 2026
@gnodet

gnodet commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

PR title updated to "Maven 3.10.x should use Maven 3.1 validation in strict mode" as suggested by @cstamas and noted in the re-review.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

cstamas
cstamas approved these changes Sep 21, 2026
View reviewed changes
@gnodet
Maven 3.10.x should use Maven 3.1 validation in strict mode
43f2ab8
- Set VALIDATION_LEVEL_STRICT = VALIDATION_LEVEL_MAVEN_3_1 so that
  3.1-level checks (duplicate plugins, bad version chars, bad snapshot
  format, reserved/bad repository IDs) are reported as errors in strict
  mode, matching the maturity of the 3.1 checks since Maven 3.1 (2012)
- Add tests for the new strict-mode behaviour (*30 variants vs default)
- Fix fragile activeByDefault profile in test fixture: use explicit
  profile activation via setActiveProfileIds to avoid CI environments
  deactivating the profile when other profiles are active
@gnodet
gnodet force-pushed the fix-validation-level branch from 7f77651 to 43f2ab8 Compare September 21, 2026 11:23
@gnodet
gnodet merged commit af936f4 into apache:maven-3.10.x Sep 21, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot assigned gnodet Sep 21, 2026
@slawekjaranowski

slawekjaranowski commented Sep 28, 2026

Copy link
Copy Markdown
Member

@gnodet, @cstamas how we should categorized it for change log ....

as we have new errors - existing projects can break a build, so maybe it should be a breaking change?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@cstamas

cstamas commented Sep 28, 2026

Copy link
Copy Markdown
Member

Yup, breaking change is ok (but if someone ignored warnings emittes since 3.1... )

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski

slawekjaranowski commented Sep 28, 2026

Copy link
Copy Markdown
Member

Yup, breaking change is ok (but if someone ignored warnings emittes since 3.1... )

so put in in enhancement ... and describe as Potentially Breaking at site description

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slawekjaranowski slawekjaranowski added the enhancement New feature or request label Sep 28, 2026
@slawekjaranowski slawekjaranowski mentioned this pull request Sep 29, 2026
Skip banDuplicatePomDependencyVersions ITs on Maven 3.10+ apache/maven-enforcer#1043
Merged
@gnodet
gnodet deleted the fix-validation-level branch October 26, 2026 07:35
@archana-1924 archana-1924 mentioned this pull request Nov 5, 2026
Upgraded library versions to fix CVEs OpenLiberty/liberty-arquillian#163
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cstamas cstamas cstamas approved these changes
@slawekjaranowski slawekjaranowski Awaiting requested review from slawekjaranowski
+1 more reviewer
@gnodet-bot gnodet-bot gnodet-bot left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@gnodet gnodet

Labels

enhancement New feature or request mvn3

Projects

None yet

Milestone

3.10.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@gnodet @cstamas @slawekjaranowski @gnodet-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.