Martin Gainty created MNG-5555:
----------------------------------
Summary: @parameter expression="${mojoExecution.lifecyclePhase}"
does not work in 3.1.1
Key: MNG-5555
URL: https://jira.codehaus.org/browse/MNG-5555
Project: Maven 2 & 3
Issue Type: Bug
Components: Multiple Language Support
Affects Versions: 3.1.0-alpha-1
Environment: JDK 1.7.0.25
maven 3.1.1
Reporter: Martin Gainty
Priority: Minor
Maven-core:3.1.1
/**
* @parameter expression="${mojoExecution}"
*/
@Parameter(defaultValue = "${mojoExecution}")
private org.apache.maven.plugin.MojoExecution execution;
public org.apache.maven.plugin.MojoExecution getExecution(){ return execution; }
/**
* @parameter expression="${mojoExecution.lifecyclePhase}"
*/
@Parameter(defaultValue = "${mojoExecution.lifecyclePhase}")
private String lifecyclePhase;
public org.apache.maven.model.Plugin plugin=new org.apache.maven.model.Plugin();
public String getLifecyclePhase()
{
if(lifecyclePhase==null)
{
plugin.setGroupId("org.apache.maven.plugins");
plugin.setArtifactId("maven-compiler-plugin");
plugin.setVersion("3.1");
String goal="compile";
String executionId="executionId";
System.out.println("CompilerMojoTestCase::getLifecyclePhase
goal="+goal+" executionId="+executionId);
org.apache.maven.plugin.MojoExecution mojo=new
org.apache.maven.plugin.MojoExecution((org.apache.maven.model.Plugin)plugin,
goal, executionId );
lifecyclePhase= mojo.getLifecyclePhase();
}
return lifecyclePhase;
}
produces:
CompilerMojoTestCase::getLifecyclePhase goal=compile executionId=executionId
CompilerMojoTestCase::testCompilerBasic LINE 143 getLifeyclePhase()= null
I am using 3.1.1 jars top to botton
why does lifecyclePhase always produce null?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira