You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2008/12/23 18:50:19 UTC

[jira] Created: (MNG-3940) Interpolation of environment variables fails on Windows

Interpolation of environment variables fails on Windows
-------------------------------------------------------

                 Key: MNG-3940
                 URL: http://jira.codehaus.org/browse/MNG-3940
             Project: Maven 2
          Issue Type: Bug
          Components: Inheritance and Interpolation
    Affects Versions: 2.1.0-M1, 2.0.9, 3.0-alpha-1
            Reporter: Benjamin Bentmann
            Priority: Minor


{noformat}
00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
{noformat}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MNG-3940) Interpolation of environment variables is not case-insensitive on Windows

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann updated MNG-3940:
-----------------------------------

    Summary: Interpolation of environment variables is not case-insensitive on Windows  (was: Interpolation of environment variables fails on Windows)

> Interpolation of environment variables is not case-insensitive on Windows
> -------------------------------------------------------------------------
>
>                 Key: MNG-3940
>                 URL: http://jira.codehaus.org/browse/MNG-3940
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>
> {noformat}
> 00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
> 00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3940) Interpolation of environment variables is not case-insensitive on Windows

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159119#action_159119 ] 

Benjamin Bentmann commented on MNG-3940:
----------------------------------------

The problem is not finding a data structure to do case-insensitive lookups, the problem is to integrate that into the existing code. For instance, the env vars are end up in the same {{Properties}} instance as used for system/execution properties...

> Interpolation of environment variables is not case-insensitive on Windows
> -------------------------------------------------------------------------
>
>                 Key: MNG-3940
>                 URL: http://jira.codehaus.org/browse/MNG-3940
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 2.0.11, 2.1.0-M2, 3.0-alpha-1
>
>
> {noformat}
> 00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
> 00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-3940) Interpolation of environment variables is not case-insensitive on Windows

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-3940.
----------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Fixed
    Fix Version/s: 3.0-alpha-1
                   2.1.0-M2
                   2.0.11

Fixed in [r729060|http://svn.eu.apache.org/viewvc?view=rev&revision=729060], [r729061|http://svn.eu.apache.org/viewvc?view=rev&revision=729061] and [r729066|http://svn.eu.apache.org/viewvc?view=rev&revision=729066], respectively.

The "fix" is not perfect in the sense that the env var lookup during interpolation is still not case-insensitive on Windows, e.g. {{${env.Path}}} is not recognized. Instead, the native env var names are normalized to upper-case, which should be good enough for the major use cases.

> Interpolation of environment variables is not case-insensitive on Windows
> -------------------------------------------------------------------------
>
>                 Key: MNG-3940
>                 URL: http://jira.codehaus.org/browse/MNG-3940
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 2.0.11, 2.1.0-M2, 3.0-alpha-1
>
>
> {noformat}
> 00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
> 00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3940) Interpolation of environment variables fails on Windows

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159080#action_159080 ] 

Benjamin Bentmann commented on MNG-3940:
----------------------------------------

Yep, it's only those env vars whose names are not natively all upper-case. For instance, the real name of the PATH var on WinXP is "Path".

> Interpolation of environment variables fails on Windows
> -------------------------------------------------------
>
>                 Key: MNG-3940
>                 URL: http://jira.codehaus.org/browse/MNG-3940
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>
> {noformat}
> 00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
> 00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3940) Interpolation of environment variables fails on Windows

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159079#action_159079 ] 

Wendy Smoak commented on MNG-3940:
----------------------------------

Thanks, Benjamin. :)

I was testing this by adding <properties><mypath>${env.PATH}</mypath></properties> to a pom and then running mvn help:effective-pom.

On Linux and OS X, the effective pom shows all the directories in the PATH environment variable.  On Windows, it remains literally ${env.PATH}.

However, ${env.M2_HOME} is expanded on all three OSs, so it's not _all_ environment variables on Windows.

> Interpolation of environment variables fails on Windows
> -------------------------------------------------------
>
>                 Key: MNG-3940
>                 URL: http://jira.codehaus.org/browse/MNG-3940
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Priority: Minor
>
> {noformat}
> 00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
> 00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-3940) Interpolation of environment variables is not case-insensitive on Windows

Posted by "Paul Benedict (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-3940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=159117#action_159117 ] 

Paul Benedict commented on MNG-3940:
------------------------------------

You could use a TreeMap with a String#CASE_INSENSITIVE_ORDER Comparator too.

> Interpolation of environment variables is not case-insensitive on Windows
> -------------------------------------------------------------------------
>
>                 Key: MNG-3940
>                 URL: http://jira.codehaus.org/browse/MNG-3940
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 2.0.9, 2.1.0-M1, 3.0-alpha-1
>            Reporter: Benjamin Bentmann
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 2.0.11, 2.1.0-M2, 3.0-alpha-1
>
>
> {noformat}
> 00:47  wsmoak  I can't get ${env.PATH} to be evaluated in the pom... but only on Windows. Any ideas?
> 00:47  wsmoak  echo %PATH% produces the right stuff. and it works fine with Maven 2.0.9 on OS X or linux
> {noformat}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira