[
http://jira.codehaus.org/browse/MNG-4312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MNG-4312.
----------------------------------
Assignee: Benjamin Bentmann
Resolution: Fixed
Fix Version/s: 3.0-alpha-3
Fixed in [r806286|http://svn.apache.org/viewvc?view=rev&revision=806286].
> Magic expressions injected by PluginParameterExpressionEvalutor conflict with
> expressions used by plugins to access system properties
> -------------------------------------------------------------------------------------------------------------------------------------
>
> Key: MNG-4312
> URL: http://jira.codehaus.org/browse/MNG-4312
> Project: Maven 2
> Issue Type: Bug
> Components: Plugins and Lifecycle
> Affects Versions: 2.0.10, 2.1.0, 2.2.1
> Reporter: Benjamin Bentmann
> Assignee: Benjamin Bentmann
> Fix For: 3.0-alpha-3
>
>
> Running "mvn package" on this POM snippet will crash:
> {code:xml}
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.2</version>
> <configuration>
> <encoding>${localRepository}</encoding>
> </configuration>
> </plugin>
> </plugins>
> </build>
> {code}
> Output:
> {noformat}
> [INFO] Failed to configure plugin parameters for:
> org.apache.maven.plugins:maven-resources-plugin:2.2
> Cause: Cannot assign value '[local] -> file://repo' to field:
> org.apache.maven.plugin.resources.ResourcesMojo.encoding;
> type: org.apache.maven.artifact.repository.DefaultArtifactRepository
> {noformat}
> Although this exploit is rather artificial, it demonstrates the problem. We
> have never properly reserved certain parameter expressions for usage by the
> core to inject magic values. Last but not least, we occasionally extend the
> list of supported expressions in newer Maven versions. That means we're in a
> bad position to demand plugin authors to not use these expressions. Hence we
> need to gracefully handle plugins that use this magic expressions for
> ordinary system properties.
> The real-life example of this issue is MNG-3683, where the Help Plugin uses
> {{${plugin}}} for a String-typed parameter but a new Maven version started to
> use this expression to inject the plugin descriptor.
--
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