[ https://jira.codehaus.org/browse/MNG-5598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=342817#comment-342817 ]
Markus KARG commented on MNG-5598: ---------------------------------- "POM.exe" was a typo. Obviously I meant "pom.xml". The actual problem is that people do copy-and-paste of variable names listed in the Windows system environment, and paste these names as-is (hence: in mixed case) into pom.xml as env references (as shown in above sample). At runtime, Maven does not resolve that variables as these are not written in upper case, hence plugins do not use the variable content but use the string ${env.VarName} LITERALLY. So the actual problem is: It just does not work! Hence, either Maven must learn to resolve variables that are not written in upper case, or the documentation must clearly say that in pom.xml all env.VarName MUST be written in upper case to be resolved at runtime and to prevent using the string ${env.VarName} as a literal. > Environment variables must be written in UPPER CASE > --------------------------------------------------- > > Key: MNG-5598 > URL: https://jira.codehaus.org/browse/MNG-5598 > Project: Maven 2 & 3 > Issue Type: Bug > Affects Versions: 3.0.4 > Environment: Windows > Reporter: Markus KARG > > On Windows, it is valid and common practice to define environment variables > with mixed case names, e. g. SystemDrive, SystemRoot, ProgramData, etc. > When writing such mixed case names in the pom.xml, these cannot be resolved > but will be used as string literals. For example, the popular exec plugin > from codehaus mojo project complains it cannot find the executable at > LITERALLY ${env.MSDevDir}/Bin/MSDEV.exe, while actually that variable is > defined in exactly that mixed case name, and points to the existing > executable. Once MSDevDir is replaced in the (wrong!) UPPER CASE form of > ${env.MSDEVDIR}, then the executable is found, which is weird! > While the MavenPropertiesGuide > (http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide) actually > only shows examples using UPPER CASE environment variables, it does not > clearly say that this is an enforced restriction. Hence, either this is a bug > in the Maven software (i. e. it unintentionally expects UPPER CASE), or it is > to be clearly said in the properties guide that UPPER CASE is a wanted > constrained of Maven. -- This message was sent by Atlassian JIRA (v6.1.6#6162)