GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||
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
|
|
Let's see CI, as it may have some quirks... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Oups, not yet, these are IT failures... |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
f92658b to
309feec
Compare
|
Companion IT PR: apache/maven-integration-testing#441 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was a problem 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.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem 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.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.
There was an error while loading. Please reload this page.
|
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. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- 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
7f77651 to
43f2ab8
Compare
There was an error while loading. Please reload this page.
|
@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? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yup, breaking change is ok (but if someone ignored warnings emittes since 3.1... ) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
so put in in enhancement ... and describe as Potentially Breaking at site description |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.