slachiewicz opened a new pull request, #13394:
URL: https://github.com/apache/maven/pull/13394

   Fixes #13347.
   
   The repository-model restrictions from #12953 (interpolation) and #13114 
(profile activation sandbox) decided "this POM came from a repository" by 
`validationLevel < VALIDATION_LEVEL_MAVEN_2_0` alone. IDEs build the user's own 
project from its POM file at `VALIDATION_LEVEL_MINIMAL` for leniency (NetBeans 
`MavenEmbedder.readProjectWithDependencies`, m2e `MavenImpl.readProject`), so 
their projects were sandboxed: `-D` profile activation stopped working, and 
`maven.model.dependencyInterpolation.full` only restored the interpolation half 
(apache/netbeans#9642).
   
   Both checks now also require `getPomFile() == null`. 
`ModelBuildingRequest.setPomFile` already documents a POM file as project mode, 
and the repository paths never set one: `DefaultArtifactDescriptorReader` sets 
it only for `WorkspaceRepository` POMs, BOM imports use `setModelSource`, and 
`DefaultProjectBuilder.build(Artifact)` passes a POM file only for a project in 
the reactor. Callers that set neither keep the validation-level fallback, so 
nothing changes for the CLI or for repository resolution. No API change.
   
   master needs the equivalent change in the v3 bridge (`DefaultProjectBuilder` 
request type); that will be a separate forward-port.
   
   Verified: `mvn -pl maven-model-builder,maven-resolver-provider,maven-core 
-am install` → BUILD SUCCESS (maven-core 402 tests). With the main-code change 
reverted, the new 
`testProjectModeAtMinimalValidationEvaluatesUserPropertyAndFileActivators` 
fails (`expected: <activated> but was: <null>`). The core ITs covering the 
hardening (MavenIT0085, mng3586, mng4379, mng4590) have not been run locally.
   


-- 
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]

Reply via email to