the confusion is that MojoExecution, MavenSession, MavenProject, and generally everything injected by PluginParameterExpressionEvaluator [1] are not Plexus components Fields marked by @Component are not injected by PluginParameterExpressionEvaluator, only fields marked by @Parameter are injected like this
Regards, Hervé [1] http://maven.apache.org/ref/3-LATEST/maven-core/apidocs/org/apache/maven/plugin/PluginParameterExpressionEvaluator.html Le jeudi 6 février 2014 20:32:47 Igor Fedorenko a écrit : > Hervé, > > Can you explain what confusion this causes? > > -- > Regards, > Igor > > On 2/6/2014, 16:47, Hervé BOUTEMY wrote: > > Hi, > > > > You'd better not use the @Component annotation but @Parameter instead: > > this is a feature that will be deprecated in future version: > > > > http://jira.codehaus.org/browse/MPLUGIN-257 > > > > Regards, > > > > Hervé > > > > Le jeudi 6 février 2014 22:04:57 Karl Heinz Marbaise a écrit : > >> Hi, > >> > >> in the meantime i found a better way (thanks to Robert Scholte): > >> @Component > >> private MojoExecution mojoExecution; > >> > >> > >> mojoExecution.getExecutionId(); > >> mojoExecution.getConfiguration(); > >> > >> Kind regards > >> Karl Heinz Marbaise > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > >> For additional commands, e-mail: dev-h...@maven.apache.org > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > > For additional commands, e-mail: dev-h...@maven.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org