jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-4136

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

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.1.0
  • Fix Version/s: Issues to be reviewed for 3.x
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows XP Professional (64-bit)
  • Complexity:
    Intermediate

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.

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. XML File
    pom.xml
    16/Apr/09 3:22 PM
    0.8 kB
    Joel Turkel

Issue Links

is related to

Bug - A problem which impairs or prevents the functions of the product. MNG-3940 Interpolation of environment variables is not case-insensitive on Windows

  • Minor - Minor loss of function, or other problem where easy workaround is present.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Benjamin Bentmann added a comment - 16/Apr/09 4:25 PM

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 - 16/Apr/09 4:25 PM 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.

People

  • Assignee:
    Unassigned
    Reporter:
    Joel Turkel
Vote (0)
Watch (0)

Dates

  • Created:
    16/Apr/09 3:22 PM
    Updated:
    20/Sep/10 11:11 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.