Shreekar-cloud commented on PR #13601: URL: https://github.com/apache/maven/pull/13601#issuecomment-6252361937
Hi @abdulhannansyed548-cmd, I was looking into the review feedback on this PR and worked out a fix on top of your two commits that makes your regression test and the existing project tests pass. I don’t want to open a competing PR on an issue you’ve claimed, so here it is for you to use or adapt: https://github.com/Shreekar-cloud/maven/tree/fix-13395-parent-resolution (single commit 6773436e0c). With a baseline run without the production changes, testLocalParentResolutionWithValidationLevels fails with “Non-resolvable parent POM”. The cause: for a non-reactor build(File), DefaultProjectBuilder only picks BUILD_EFFECTIVE for processPlugins && STRICT, and DefaultModelBuilder only looks for local parents for build requests (findLocalParent is gated on isBuildRequest()). The change: (1) pomFile != null now means a project build (repository-resolved artifacts have pomFile == null, so those are unchanged); (2) the validation level is forwarded only for build requests, leaving compat STRICT (30) to the default SPI STRICT (42) and passing lower levels, which have the same values in both APIs, unchanged, so consumer requests keep their old defaults; (3) AbstractMavenProjectTestCase sets a scope manager, since these tests now go through strict effective validation. Behavior changes worth review: build(File) with default STRICT and processPlugins=false is now validated strictly (as in Maven 3), and workspace project POMs resolved as dependencies are now built as projects. Locally I ran ProjectBuilderTest, the org.apache.maven.project tests and the maven-impl model/cache tests (259 tests in maven-core, 0 failures). I haven’t run the full suite or spotless, so CI is the real check. Happy to open a PR myself or send a patch if you’d prefer that. Just let me know. -- 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]
