Skip to content

[MNG-3309] Cascading profile activation#1774

Open
gnodet wants to merge 1 commit into
apache:masterfrom
gnodet:cascading-profile-activation
Open

[MNG-3309] Cascading profile activation#1774
gnodet wants to merge 1 commit into
apache:masterfrom
gnodet:cascading-profile-activation

Conversation

@gnodet

@gnodet gnodet commented Oct 4, 2024

Copy link
Copy Markdown
Contributor

@gnodet gnodet added this to the 4.0.0-beta-5 milestone Oct 4, 2024
@gnodet gnodet force-pushed the cascading-profile-activation branch from 21eb346 to 1ed072b Compare October 4, 2024 20:05
@gnodet gnodet modified the milestones: 4.0.0-beta-5, 4.1.0 Oct 7, 2024
@gnodet gnodet force-pushed the cascading-profile-activation branch 2 times, most recently from 3f184eb to 3d21d5f Compare October 25, 2024 20:36
@gnodet gnodet marked this pull request as draft November 20, 2024 20:39
@gnodet gnodet force-pushed the cascading-profile-activation branch from 9d59fbc to a5a3941 Compare July 4, 2025 07:49
@gnodet gnodet marked this pull request as ready for review July 4, 2025 07:50
@gnodet gnodet force-pushed the cascading-profile-activation branch from a5a3941 to c7edd16 Compare October 9, 2025 07:25
@gnodet gnodet force-pushed the cascading-profile-activation branch 5 times, most recently from 4b18472 to 3dfcd05 Compare June 2, 2026 17:18
@gnodet gnodet force-pushed the cascading-profile-activation branch 3 times, most recently from bd32d8c to cd869f3 Compare June 8, 2026 17:44
Cascading profile activation allows a profile to set a property that immediately
triggers the activation of subsequent profiles within the same POM.

Implementation:
- DefaultProfileSelector now iterates profile activation in a loop until stable
- Cascaded properties are stored in a separate map (DefaultProfileActivationContext)
  isolated from main model properties to avoid interference with settings profiles
- Model properties (including cascaded ones) are only consulted for POM profile
  activation (Profile.SOURCE_POM), never for settings profiles — prevents cascaded
  properties from overriding Maven system properties that affect repository resolution
- Property priority: user properties > system properties > model properties (POM only)
- Cascaded properties are cleared after each activation round

The full IT suite (1034 tests) passes locally.
@gnodet gnodet force-pushed the cascading-profile-activation branch from cd869f3 to b4ba025 Compare June 8, 2026 19:50
@cstamas

cstamas commented Jun 8, 2026

Copy link
Copy Markdown
Member

Is this whole PR only about cascading profile activation? There are mvnup changes for example...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants