[
https://issues.apache.org/jira/browse/MPH-119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15639913#comment-15639913
]
Hudson commented on MPH-119:
----------------------------
SUCCESS: Integrated in Jenkins build maven-plugins #7454 (See
[https://builds.apache.org/job/maven-plugins/7454/])
[MPH-119] The "artifact" parameter is not taken into account with Maven 3
Starting with Maven 3, PluginParameterExpressionEvaluator ignores the project
given as parameter in its 6-args constructor, and fetches instead the current
project from the Maven session. As such, the plugin needs to set the fake
project created through the "artifact" parameter as the session current
project, and put back the real one after construction of the evaluator. (gboue:
[http://svn.apache.org/viewvc/?view=rev&rev=1768231])
* (add) maven-help-plugin/src/it/evaluate-artifact-with-expression-with-output
* (add)
maven-help-plugin/src/it/evaluate-artifact-with-expression-with-output/pom.xml
* (add)
maven-help-plugin/src/it/evaluate-artifact-with-expression-with-output/test.properties
* (add)
maven-help-plugin/src/it/evaluate-artifact-with-expression-with-output/verify.groovy
* (edit)
maven-help-plugin/src/main/java/org/apache/maven/plugins/help/EvaluateMojo.java
> The "artifact" parameter is not taken into account with Maven 3
> ---------------------------------------------------------------
>
> Key: MPH-119
> URL: https://issues.apache.org/jira/browse/MPH-119
> Project: Maven Help Plugin
> Issue Type: Bug
> Components: evaluate
> Affects Versions: 2.2
> Reporter: Guillaume Boué
> Assignee: Guillaume Boué
>
> With Maven 3, the {{artifact}} parameter is not taken into account when
> evaluating expressions. Example:
> {noformat}
> $ mvn help:evaluate -Dartifact=log4j:log4j -Dexpression=project.name
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Maven Stub Project (No POM) 1
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-help-plugin:2.2:evaluate (default-cli) @ standalone-pom ---
> [INFO]
> Maven Stub Project (No POM)
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> {noformat}
> Expected output would be "Apache Log4j", instead of the stub Maven project.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)