[
http://jira.codehaus.org/browse/MNG-4315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MNG-4315.
----------------------------------
Assignee: Benjamin Bentmann
Resolution: Not A Bug
This change in behavior is indeed intentional. The simple rationale: {{${var}}}
!= {{${project.var}}} != {{${env.var}}}, i.e. the prefix of an expression
matters. So, when you want to override a property from the CLI be sure to use
the proper name, e.g. {{-Denv.svnRevNumber=xx}} in your example.
> Arbitrary command line environment variables no longer pass to POM
> ------------------------------------------------------------------
>
> Key: MNG-4315
> URL: http://jira.codehaus.org/browse/MNG-4315
> Project: Maven 2
> Issue Type: Bug
> Components: Command Line, POM
> Affects Versions: 2.1.0, 2.2.0, 2.2.1
> Reporter: Mark Anderson
> Assignee: Benjamin Bentmann
>
> Up through Maven v2.0.9 we used to be able to specify arbitrary command line
> variables such as:
> mvn clean install -DsvnRevNumber=xx
> And that variable was available in a POM with:
> ${env.svnRevNumber}
> At v2.1.0 this stopped working and still seems to be that way in v2.2.1.
> Though this may not have been the original intent, it was a useful feature to
> get dynamic information into the POM and passed to a custom mojo.
--
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