Tarun4201 commented on issue #8488: URL: https://github.com/apache/maven/issues/8488#issuecomment-5799640208
I have investigated this bug and submitted a fix in PR https://github.com/apache/maven/pull/13254 **Root Cause:** In `DefaultProfileSelector.getActiveProfiles()`, the `activeByDefault` suppression logic only guarded **POM-sourced** profiles. External profiles (e.g. from `settings.xml`) with `activeByDefault=true` were unconditionally appended to the active set, even when the user explicitly requested a different profile via `-P`. **Fix:** External `activeByDefault` profiles are now deferred into a separate list (`activeExternalProfilesByDefault`) and only merged when **no** profile was explicitly activated via `-P`, mirroring the existing pattern already in place for POM profiles. This correctly implements Maven's documented behaviour: all `activeByDefault` profiles are suppressed whenever any profile is explicitly activated. -- 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]
