Re: BuildPluginManager NPE

2020-01-21 Thread Francois Papon
Thanks Romain! I will try this way. regards, François fpa...@apache.org Le 22/01/2020 à 07:05, Romain Manni-Bucau a écrit : > Guess you wanted to call MavenPluginManager#getConfiguredMojo or mimic its > interpolation support: > > ExpressionEvaluator expressionEvaluator = new >

Re: BuildPluginManager NPE

2020-01-21 Thread Romain Manni-Bucau
Guess you wanted to call MavenPluginManager#getConfiguredMojo or mimic its interpolation support: ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator(session, mojoExecution); this.populatePluginFields(mojo, mojoDescriptor, pluginRealm, pomConfiguration,

Re: BuildPluginManager NPE

2020-01-20 Thread Francois Papon
Hi, I found a workaround by adding the parameter in the configuration: ${session} However, I don't understand why the default values of the external plugin are not used: @Parameter(defaultValue = "${session}", readonly = true)  protected MavenSession mavenSession; regards, François

BuildPluginManager NPE

2020-01-20 Thread Francois Papon
Hi, I'm using the BuildPluginManager in my custom maven-plugin to execute an external maven plugin but I have a NPE  in the executeMojo because the maven session in the external maven plugin is null. Here an example of the code I'm using:             PluginDescriptor toolPluginDescriptor =