String invokedVia, boolean canUsePrefix, boolean isOptionalMojo )
throws MojoFailureException, MojoExecutionException
{
try
{
DefaultLifecycleExecutor lifecycleExecutor =
(DefaultLifecycleExecutor) session.lookup( LifecycleExecutor.ROLE );
Method m =
lifecycleExecutor.getClass().getDeclaredMethod(
"getMojoDescriptor",
new Class[] { String.class, MavenSession.class,
MavenProject.class, String.class,
Boolean.TYPE, Boolean.TYPE } );
m.setAccessible( true );