Maven
  1. Maven
  2. MNG-5271

Cannot resolve active profile name at build time

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Profiles
    • Labels:
      None
    • Environment:
      Mac OS 10.6
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      I have a maven profile defined in my pom. It's not active by default, so I run -P <profilename>.
      When the profile is running, I want to construct a path that includes the name of the profile. I've looked online and it appears that

      http://stackoverflow.com/questions/2012198/maven-can-i-reference-profile-id-in-profile-definition

      would have the answer. Alas, it doesn't work for me at build time. If I do a mvn help:evaluate -P <profilename> and use $

      {projects.activeProfiles[0].id}

      , I get the value I would expect. When I run in the build, though, it doesn't resolve and just uses the literal value in the path.

        Activity

        Hide
        Richard Bone added a comment -

        Could somebody triage this?

        Show
        Richard Bone added a comment - Could somebody triage this?
        Show
        Jason van Zyl added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
        Hide
        Jason van Zyl added a comment -

        Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.

        Show
        Jason van Zyl added a comment - Please refer to https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014 if you're wondering why this issue was closed out.
        Jason van Zyl made changes -
        Field Original Value New Value
        Resolution Incomplete [ 4 ]
        Status Open [ 1 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Richard Bone
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: