gnodet opened a new pull request, #13198: URL: https://github.com/apache/maven/pull/13198
## Context Follow-up to #13197 (4.0.x / rc7 fix). That PR used a targeted workaround (downgrade effective-model validation to `MAVEN_2_0` for `BUILD_EFFECTIVE`). This PR makes the distinction architectural for 4.1.0. ## Problem `BUILD_EFFECTIVE` was included in `isBuildRequest()` alongside `BUILD_PROJECT` and `BUILD_CONSUMER`, inheriting strict effective-model validation. But `BUILD_EFFECTIVE` is a tooling-only mode (used by `mvnup`, IDEs) that skips the reactor scan — BOM imports from reactor siblings cannot be resolved. This produced misleading `dependencies.dependency.version is missing` cascade errors for every dependency relying on such a BOM. ## Fix Introduce two clearly-named predicates with explicit javadoc: **`isFilesystemRequest()`** — `BUILD_PROJECT` ∪ `BUILD_EFFECTIVE` ∪ `BUILD_CONSUMER` All three work on POM files on the local filesystem. Used for: - XML parsing strictness - File/raw model validation level (STRICT) - `pomFile` stamping onto model - `relativePath` computation - Local parent lookup (`findLocalParent`) - `transformFileToRaw` (4.1→4.0 transform) - Repository merge precedence **`isBuildRequest()`** — `BUILD_PROJECT` ∪ `BUILD_CONSUMER` only (`BUILD_EFFECTIVE` excluded) Used exclusively for effective-model validation level. `BUILD_EFFECTIVE` is excluded because it cannot satisfy the reactor-presence invariant that strict validation assumes. **Effective model validation levels:** | Request type | Level | |---|---| | `BUILD_PROJECT`, `BUILD_CONSUMER` | `STRICT` | | `BUILD_EFFECTIVE` | `MAVEN_2_0` (structural errors caught; version-from-BOM is a warning, not fatal) | | `CONSUMER_PARENT`, `CONSUMER_DEPENDENCY` | `MINIMAL` | ## Testing - `mvn verify -pl impl/maven-impl -am -B` passes (737 tests, 0 failures) - Existing `BUILD_CONSUMER` tests for parent profile property resolution pass (the local parent lookup path is preserved — `BUILD_CONSUMER` is correctly classified as a filesystem request) Related: #13197 (rc7 targeted fix, `maven-4.0.x`) Fixes #13190 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
