Skip to content

Remove profile getSource / setSource #2569

Closed

Description

@gnodet

Affected version

4.1.0

Bug description

This is a remnant from Maven 3 which we should get rid of and replace with checks on the InputLocation / InputSource somehow.

Activity

  1. added
    bug
    enhancement
    and removed
    bug
    on Jul 4, 2025
  2. added this to the 4.1.0 milestone on Jul 4, 2025
  3. vijaykriishna commented on Nov 8, 2025

    @vijaykriishna
  4. added 4 commits that reference this issue on Jun 26, 2026
  5. codewithsinchana commented on Nov 5, 2026

    @codewithsinchana
    Contributor

    Hi @gnodet, I noticed the compatibility regression mentioned in the latest review regarding settings profiles and activeByDefault. I'd be interested in contributing the suggested fix along with a regression test. Would you prefer me to prepare this as a separate contribution, or would you like to address it in the existing PR?

  6. added 4 commits that reference this issue on Nov 5, 2026
  7. gnodet commented on Nov 5, 2026

    @gnodet
    ContributorAuthor

    Hi @codewithsinchana, the fix is already applied — no separate contribution needed!

    PR #12377 has just been rebased onto master and now includes:

    1. Removal of getSource()/setSource() from the 4.2.0+ API model — POM vs settings profiles are now distinguished via InputSource.getModelId() (non-empty = POM, empty/null = settings)
    2. Compat-layer fix — SettingsUtils.convertFromSettingsProfile() now explicitly calls result.setSource(Profile.SOURCE_SETTINGS), preserving correct activeByDefault behaviour for settings profiles in the deprecated compat DefaultProfileSelector
    3. Updated ConditionProfileActivator and PropertyProfileActivator — these also used Profile.SOURCE_POM.equals(profile.getSource()) for cascaded property lookups and are now using the InputSource.getModelId()-based check consistently
    4. Merged test suite — cascading activation tests and new isFromPom()/activeByDefault regression tests (the scenario from your analysis) are both included

    Your PR #13854 helped surface the compat-layer regression clearly, thank you!

  8. added 3 commits that reference this issue on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions