Maven 2 & 3
  1. Maven 2 & 3
  2. MNG-3545

Option -P-profile overridden if profile is activebyDefault

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.0.10, 2.1.0-M1
    • Component/s: Profiles
    • Labels:
      None
    • Complexity:
      Intermediate
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      In maven 2.0.9, deactivating a profile "foo" that is declared and marked activeByDefault in the local POM does not work, as in DefaultProfileManager.java:227 all activeByDefault profiles are added if no profile is explicitly given ("-Pbar").

      In the attached zip, run
      mvn -P-foo help:active-profiles
      and note that foo is active.

      The patch fixes these issues by checking all default-activated profiles against the exclusions list when they are added "by default".

      1. MNG-3545-profiles.patch
        1 kB
        David Bernhard

        Issue Links

          Activity

            People

            • Assignee:
              Paul Gier
              Reporter:
              David Bernhard
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: