Maven
  1. Maven
  2. MNG-4136

Regression: Environment Variables With Parenthesis Can't Be Referenced in POM

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP Professional (64-bit)
    • Complexity:
      Intermediate
    • Number of attachments :
      1

      Description

      It looks like Maven can longer use environment variables with parenthesis e.g. ProgramFiles(x86). The attached pom.xml emits the following with Maven 2.1.0:

      ProgramFiles(x86) = $

      {env.ProgramFiles(x86)}

      With Maven 2.0.10 we correctly get the following:

      ProgramFiles(x86) = C:\Program Files (x86)

      This is a pain since ProgramFiles(x86) is standard environment variable on 64-bit Windows.

      1. pom.xml
        0.8 kB
        Joel Turkel

        Issue Links

          Activity

          Hide
          Benjamin Bentmann added a comment -

          I have no 64 bit box so can't try but I assume it's not the parenthesis but the casing of the variable name that causes troubles. Although env vars are case-insensitive on Windows, Maven stores them internally in java.util.Properties. To fix MNG-3940, env vars are now stored using the upper-cased name. Hence I would expect that

          <echo message="ProgramFiles(x86) = ${env.PROGRAMFILES(X86)}"/>
          

          should work with Maven 2.1.0 (but not with Maven 2.0.10).

          Until this is properly fixed, I guess we should at least better document the current behavior.

          Show
          Benjamin Bentmann added a comment - I have no 64 bit box so can't try but I assume it's not the parenthesis but the casing of the variable name that causes troubles. Although env vars are case-insensitive on Windows, Maven stores them internally in java.util.Properties . To fix MNG-3940 , env vars are now stored using the upper-cased name. Hence I would expect that <echo message= "ProgramFiles(x86) = ${env.PROGRAMFILES(X86)}" /> should work with Maven 2.1.0 (but not with Maven 2.0.10). Until this is properly fixed, I guess we should at least better document the current behavior.
          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.

            People

            • Assignee:
              Unassigned
              Reporter:
              Joel Turkel
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: