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

   Fixes #12288.
   
   Profiles activated through `settings.xml` (`<activeProfiles>` or
   `<activation><activeByDefault>true</activeByDefault>`) had their
   `<properties>` block dropped before the resolver session was built, so
   `aether.*` configuration declared in such a profile silently failed.
   The same `<properties>` on the same `<profile>` worked when activated
   via CLI `-P`.
   
   ## Changes
   
   1. Two ITs in `core-it-suite` covering both settings.xml activation
      channels — `testActiveByDefaultProfile` (red on master) and
      `testActiveProfilesList` (green on master, regression guard).
   2. `DefaultRepositorySystemSessionFactory#getPropertiesFromRequestedProfiles`
      extended to also consider `request.getActiveProfiles()` and
      `<activeByDefault>true</activeByDefault>` profiles.
   
   Locally verified against the `core-it-suite`:
   - master + new ITs: 1 of 2 fail (`testActiveByDefaultProfile`)
   - master + new ITs + fix: 2 of 2 pass
   
   ## Scope
   
   Only the profile's `<properties>` block is affected — other profile
   content (`<plugins>`, `<dependencies>`, `<repositories>`, …) flows
   through its existing channels unchanged.
   
   Limitation: this does not re-implement the full `DefaultProfileSelector`
   semantics (e.g. `activeByDefault` deactivation when other profiles of
   the same source are active). For the property-propagation use case in
   scope of #12288 this is sufficient; injecting `ProfileSelector` here
   would be a larger refactor in a session-build hot path and is left to a
   follow-up if needed.
   
   ## Affected versions
   
   Reproduces on Maven 4.x master and on Maven 3.9.16; backport candidate.
   
   ## Test plan
   
   - [x] `mvn install` on `apache-maven` from the branch builds cleanly
   - [x] `mvn verify -Prun-its -DmavenDistro=… 
-Dit.test=MavenITSettingsProfileAetherPropertiesTest` on the patched dist: both 
ITs green
   - [x] Same command on vanilla master dist: `testActiveByDefaultProfile` red, 
`testActiveProfilesList` green
   - [ ] `core-it-suite` full run (not done locally — CI takes it from here)
   


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