gnodet commented on issue #5813:
URL: https://github.com/apache/maven/issues/5813#issuecomment-4110151198

   This issue is fixed in Maven 4. The architecture has been fundamentally 
reworked:
   
   1. **Session-based repository propagation**: Maven 4 uses a Session object 
that carries all repository configuration, including repositories from active 
settings.xml profiles. This session is inherited by all derived model builder 
requests.
   
   2. **Explicit repository passing for import scope**: In 
`DefaultModelBuilder.java`, when processing import-scoped dependencies, the 
repositories (including those from settings profiles) are explicitly passed to 
the import request via 
`ModelBuilderRequest.builder().repositories(repositories)`.
   
   3. **Integration test exists**: 
`MavenITmng4347ImportScopeWithSettingsProfilesTest` verifies this exact 
scenario — a settings profile enables SNAPSHOT resolution on central, which is 
required to resolve an import-scoped POM with a SNAPSHOT version. The test 
passes.
   
   The original bug was that `DefaultModelResolver` in Maven 2/3 didn't 
propagate settings profile repository modifications to transitive import-scoped 
dependency resolution. Maven 4 eliminates this class of bugs entirely through 
its session-based architecture.
   
   _Claude Code on behalf of Guillaume Nodet_


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