public PluginDescriptor loadPlugin ( Plugin plugin ) throws MojoExecutionException { try { final Object repositorySessionObject = this . getRepositorySessionMethod . invoke ( this . session ) ; return ( PluginDescriptor ) this . loadPluginMethod . invoke ( this . buildPluginManager , plugin , getSession ( ) . getCurrentProject ( ) . getRemotePluginRepositories ( ) , repositorySessionObject ) ; } catch ( IllegalAccessException | IllegalArgumentException | InvocationTargetException e ) { throw new MojoExecutionException ( e . getLocalizedMessage ( ) , e ) ; } }
Load the given plugin .