Maven
  1. Maven
  2. MNG-4583

warning printed when a pom does not use an activated profile is poorly worded and also should not be printed for multi-module builds

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: 2.0.11, 2.2.1, 3.0-alpha-6
    • Fix Version/s: 3.0-alpha-6
    • Component/s: Profiles
    • Labels:
      None
    • Complexity:
      Intermediate
    • Number of attachments :
      1

      Description

      This is a followup to http://jira.codehaus.org/browse/MNG-3641. Refer to that issue for the background.

      The current warning message is:

      "Profile with id: '" + explicitProfileId + "' has not been activated."

      I think this message is misleading, because the profile actually is activated - it's just not used at all in the pom being processed. I suggest changing the message to something like:

      "Profile with id '" + explicitProfileId + "' is activated, but this pom does not contain any usages of the profile."

      Also, I don't think it makes sense to print this warning at all in a multi-module build. In the large multi-module project I work on, we have a number of profiles that are only used in a handful of the 50 or so modules.

        Issue Links

          Activity

          Hide
          Ian Springer added a comment -

          Interesting. That's not how activation is described in the docs (http://maven.apache.org/guides/introduction/introduction-to-profiles.html). Hopefully, the docs will be updated for 3.0. Otherwise, the warning message will continue to be confusing/misleading for users, as it has been for me.

          Show
          Ian Springer added a comment - Interesting. That's not how activation is described in the docs ( http://maven.apache.org/guides/introduction/introduction-to-profiles.html ). Hopefully, the docs will be updated for 3.0. Otherwise, the warning message will continue to be confusing/misleading for users, as it has been for me.
          Hide
          Stevo Slavic added a comment -

          Are there any means to configure Maven not to print this warning? In my case a multi-module project uses activated profile only in a single module. If this is not supported, maybe support could be added, e.g. to allow one to specify profile names for which this warning should not be printed.

          Show
          Stevo Slavic added a comment - Are there any means to configure Maven not to print this warning? In my case a multi-module project uses activated profile only in a single module. If this is not supported, maybe support could be added, e.g. to allow one to specify profile names for which this warning should not be printed.
          Hide
          Benjamin Bentmann added a comment -

          The warning is supposed to only show up when not a single project within the reactor was affected by the profile. So consider to provide an example project to prove otherwise.

          Show
          Benjamin Bentmann added a comment - The warning is supposed to only show up when not a single project within the reactor was affected by the profile. So consider to provide an example project to prove otherwise.
          Hide
          Stevo Slavic added a comment -

          It seems this is m2eclipse issue - checked, it doesn't get printed in CLI, only in eclipse for incremental builds.

          Show
          Stevo Slavic added a comment - It seems this is m2eclipse issue - checked, it doesn't get printed in CLI, only in eclipse for incremental builds.
          Hide
          Oblio added a comment -

          The issue's closed or I'd +1 it.

          Show
          Oblio added a comment - The issue's closed or I'd +1 it.

            People

            • Assignee:
              Benjamin Bentmann
              Reporter:
              Ian Springer
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: