public PluginDescriptor loadPluginFully( Plugin plugin, MavenProject project, MavenSession session ) throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException, InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException, PluginVersionNotFoundException { PluginDescriptor pluginDescriptor = loadPluginDescriptor( plugin, project, session ); try { pluginManager.setupPluginRealm( pluginDescriptor, session, null, null, null ); } catch ( PluginResolutionException e ) { throw new PluginManagerException( plugin, e.getMessage(), e ); } return pluginDescriptor; }
} catch (IOException e) { throw (PluginManagerException)new PluginManagerException(e.getMessage()).initCause(e); } finally { configuratorFilter = null;
/** * Verify plugin. * * @param plugin the plugin * @param project the project * @param session the session * @return the plugin descriptor * @throws LifecycleExecutionException the lifecycle execution exception * @throws PluginNotFoundException the plugin not found exception */ private PluginDescriptor loadPluginDescriptor( Plugin plugin, MavenProject project, MavenSession session ) throws LifecycleExecutionException, PluginNotFoundException { PluginDescriptor pluginDescriptor; try { pluginDescriptor = pluginManager.loadPluginDescriptor( plugin, project, session ); } catch ( PluginManagerException e ) { throw new LifecycleExecutionException( "Internal error in the plugin manager getting plugin '" + plugin.getKey() + "': " + e.getMessage(), e ); } catch ( PluginVersionResolutionException | InvalidVersionSpecificationException | InvalidPluginException // | ArtifactNotFoundException | ArtifactResolutionException | PluginVersionNotFoundException e ) { throw new LifecycleExecutionException( e.getMessage(), e ); } return pluginDescriptor; }
} catch (IOException e) { throw (PluginManagerException)new PluginManagerException(e.getMessage()).initCause(e); } finally { configuratorFilter = null;
/** * Verify plugin. * * @param plugin the plugin * @param project the project * @param session the session * @return the plugin descriptor * @throws LifecycleExecutionException the lifecycle execution exception * @throws PluginNotFoundException the plugin not found exception */ private PluginDescriptor loadPluginDescriptor( Plugin plugin, MavenProject project, MavenSession session ) throws LifecycleExecutionException, PluginNotFoundException { PluginDescriptor pluginDescriptor; try { pluginDescriptor = pluginManager.loadPluginDescriptor( plugin, project, session ); } catch ( PluginManagerException e ) { throw new LifecycleExecutionException( "Internal error in the plugin manager getting plugin '" + plugin.getKey() + "': " + e.getMessage(), e ); } catch ( PluginVersionResolutionException | InvalidVersionSpecificationException | InvalidPluginException // | ArtifactNotFoundException | ArtifactResolutionException | PluginVersionNotFoundException e ) { throw new LifecycleExecutionException( e.getMessage(), e ); } return pluginDescriptor; }
public Object getPluginComponent( Plugin plugin, String role, String roleHint ) throws PluginManagerException, ComponentLookupException { MavenSession session = legacySupport.getSession(); PluginDescriptor pluginDescriptor; try { pluginDescriptor = pluginManager.getPluginDescriptor( plugin, session.getCurrentProject().getRemotePluginRepositories(), session.getRepositorySession() ); pluginManager.setupPluginRealm( pluginDescriptor, session, null, null, null ); } catch ( Exception e ) { throw new PluginManagerException( plugin, e.getMessage(), e ); } ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( pluginDescriptor.getClassRealm() ); return container.lookup( role, roleHint ); } finally { Thread.currentThread().setContextClassLoader( oldClassLoader ); } }
+ plugin.getKey() + "': " + e.getMessage(), e );
public Map<String, Object> getPluginComponents( Plugin plugin, String role ) throws ComponentLookupException, PluginManagerException { MavenSession session = legacySupport.getSession(); PluginDescriptor pluginDescriptor; try { pluginDescriptor = pluginManager.getPluginDescriptor( plugin, session.getCurrentProject().getRemotePluginRepositories(), session.getRepositorySession() ); pluginManager.setupPluginRealm( pluginDescriptor, session, null, null, null ); } catch ( Exception e ) { throw new PluginManagerException( plugin, e.getMessage(), e ); } ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( pluginDescriptor.getClassRealm() ); return container.lookupMap( role ); } finally { Thread.currentThread().setContextClassLoader( oldClassLoader ); } }
+ plugin.getKey() + "': " + e.getMessage(), e );
throw new PluginManagerException( plugin, e.getMessage(), e ); throw new PluginManagerException( plugin, e.getMessage(), e ); throw new PluginManagerException( plugin, e.getMessage(), e );
+ plugin.getKey() + "': " + e.getMessage(), e );
public PluginDescriptor verifyPlugin( Plugin plugin, MavenProject project, Settings settings, ArtifactRepository localRepository ) throws ArtifactResolutionException, PluginVersionResolutionException, ArtifactNotFoundException, InvalidVersionSpecificationException, InvalidPluginException, PluginManagerException, PluginNotFoundException, PluginVersionNotFoundException { MavenSession session = legacySupport.getSession(); if ( plugin.getVersion() == null ) { PluginVersionRequest versionRequest = new DefaultPluginVersionRequest( plugin, session.getRepositorySession(), project.getRemotePluginRepositories() ); plugin.setVersion( pluginVersionResolver.resolve( versionRequest ).getVersion() ); } try { return pluginManager.getPluginDescriptor( plugin, project.getRemotePluginRepositories(), session.getRepositorySession() ); } catch ( PluginResolutionException e ) { throw new PluginNotFoundException( plugin, project.getPluginArtifactRepositories() ); } catch ( PluginDescriptorParsingException | InvalidPluginDescriptorException e ) { throw new PluginManagerException( plugin, e.getMessage(), e ); } }
+ plugin.getKey() + "': " + e.getMessage(), e );
+ plugin.getKey() + "': " + e.getMessage(), e );
+ plugin.getKey() + "': " + e.getMessage(), e );