gnodet commented on PR #1774:
URL: https://github.com/apache/maven/pull/1774#issuecomment-4651758636

   This PR implements cascading profile activation 
([MNG-3309](https://issues.apache.org/jira/browse/MNG-3309)): when a profile 
sets a property, that property can immediately trigger the activation of 
subsequent profiles within the same POM.
   
   **Implementation summary:**
   
   The core change lives in `DefaultProfileSelector`, which now iterates 
profile activation in a loop until no new profiles are activated. Each newly 
activated profile's properties are collected into a separate 
`cascadedProfileProperties` map (via `DefaultProfileActivationContext`), 
deliberately isolated from the main model properties to avoid interference with 
settings profile activation and repository resolution.
   
   Key design decisions:
   - Model properties (including cascaded ones) are only consulted for **POM 
profile activation** (`Profile.SOURCE_POM`), never for settings profiles — this 
prevents cascaded properties from accidentally overriding Maven system 
properties that affect repository resolution
   - Property priority is maintained as: user properties > system properties > 
model properties (POM only)
   - Cascaded properties are cleared after each activation round to avoid 
accumulation across builds
   
   The full IT suite (1034 tests) passes locally with only pre-existing 
failures unrelated to this change.
   
   @cstamas Would you have time to take a look? Particularly interested in your 
thoughts on the isolation of cascaded properties from settings profile 
activation.


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