UjjwalChitransh opened a new pull request, #12242: URL: https://github.com/apache/maven/pull/12242
## Problem In MojoExtension.beforeEach(), alignToBaseDirectory was called on tmodel (the raw parsed POM) and the result was stored in the extension context. This caused two bugs: 1. NPE when no POM exists: tmodel is null when no POM file is found, causing a NullPointerException. 2. Missing defaults: The stored model was the raw parsed POM, missing defaults merged in from defaultModel (groupId, artifactId, build paths, etc.). Fixes #12201 ## Fix Call alignToBaseDirectory on model (the merged result of tmodel + defaultModel) and store that aligned model. The createProject provider inside Foo is also updated to use alignedModel consistently. ## Testing - All 22 existing tests in maven-testing pass. - The NPE scenario (no POM file) is now safe: model is never null since defaultModel is always the fallback. -- 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]
