logger.warn( "Failed to lookup lifecycle participants: " + e.getMessage() ); logger.warn( "Failed to lookup lifecycle participants: " + e.getMessage() );
/** * Allows us to pull the ArchiverManager instance out of the container without causing a chicken-and-egg * instantiation/composition problem. */ @Override public void contextualize( final Context context ) throws ContextException { final PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY ); try { archiverManager = (ArchiverManager) container.lookup( ArchiverManager.ROLE ); } catch ( final ComponentLookupException e ) { throw new ContextException( "Error retrieving ArchiverManager instance: " + e.getMessage(), e ); } }
public <T> T lookupComponent(Class<T> clazz) { try { return plexus.lookup(clazz); } catch (ComponentLookupException ex) { LOG.warning(ex.getMessage()); } return null; }
protected ArtifactRepositoryLayout getArtifactRepositoryLayout() throws MojoFailureException { try { ArtifactRepositoryLayout artifactRepositoryLayout = null; artifactRepositoryLayout = (ArtifactRepositoryLayout) container.lookup("org.apache.maven.artifact." + "repository.layout.ArtifactRepositoryLayout", repositoryLayout); if (artifactRepositoryLayout == null) { throw new MojoFailureException("Unknown repository layout '" + repositoryLayout + "'."); } return artifactRepositoryLayout; } catch (ComponentLookupException e) { throw new MojoFailureException("Unable to lookup the repository layout component '" + repositoryLayout + "': " + e.getMessage()); } }
public TaskQueueExecutor getPrepareBuildTaskQueueExecutor() throws TaskQueueManagerException { try { return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "prepare-build-agent" ); } catch ( ComponentLookupException e ) { throw new TaskQueueManagerException( e.getMessage(), e ); } }
public void initialize() throws InitializationException { try { dispatcher = (DefaultSecDispatcher) plexusContainer.lookup( SecDispatcher.class, "maven" ); } catch ( ComponentLookupException e ) { throw new InitializationException( e.getMessage(), e ); } }
public void initialize() throws InitializationException { try { dispatcher = (DefaultSecDispatcher) plexusContainer.lookup( SecDispatcher.class, "maven" ); } catch ( ComponentLookupException e ) { throw new InitializationException( e.getMessage(), e ); } }
public AbstractPrivilegeTest( String testRepositoryId ) { super( testRepositoryId ); try { this.init(); } catch ( ComponentLookupException e ) { Assert.fail( e.getMessage() ); } }
public TaskQueueExecutor getBuildTaskQueueExecutor() throws TaskQueueManagerException { try { return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, "build-agent" ); } catch ( ComponentLookupException e ) { throw new TaskQueueManagerException( e.getMessage(), e ); } }
public AbstractPrivilegeTest() { try { this.init(); } catch ( ComponentLookupException e ) { Assert.fail( e.getMessage() ); } }
public TaskQueueExecutor getPerformReleaseTaskQueueExecutor() throws TaskQueueManagerException { try { return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, PLEXUS_KEY_PERFORM_RELEASE_TASKQUEUE_EXECUTOR ); } catch ( ComponentLookupException e ) { throw new TaskQueueManagerException( e.getMessage(), e ); } }
public TaskQueueExecutor getPrepareReleaseTaskQueueExecutor() throws TaskQueueManagerException { try { return (TaskQueueExecutor) container.lookup( TaskQueueExecutor.class, PLEXUS_KEY_PREPARE_RELEASE_TASKQUEUE_EXECUTOR ); } catch ( ComponentLookupException e ) { throw new TaskQueueManagerException( e.getMessage(), e ); } }
@Override public File resolve(final MavenProject project, final String artifact) { try { String hint = isUsingEclipseAether() ? "eclipse" : "sonatype"; final ArtifactResolver resolver = container.lookup(ArtifactResolver.class, hint); return resolver.resolve(project, artifact); } catch (ComponentLookupException e) { throw new RuntimeException(e.getMessage(), e); } }
public AbstractPrivilegeTest() { try { this.init(); } catch (ComponentLookupException e) { Assert.fail(e.getMessage()); } }
public List<ProjectBuildingResult> buildProjects( File mavenProject, boolean recursive ) throws ProjectBuildingException, MavenEmbedderException { ClassLoader originalCl = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( componentProvider.getSystemClassLoader() ); ProjectBuilder projectBuilder = componentProvider.lookup( ProjectBuilder.class ); return projectBuilder.build( Collections.singletonList( mavenProject ), recursive, getProjectBuildingRequest() ); } catch ( ComponentLookupException e ) { throw new MavenEmbedderException( e.getMessage(), e ); } finally { Thread.currentThread().setContextClassLoader( originalCl ); } }
public AbstractPrivilegeTest(String testRepositoryId) { super(testRepositoryId); try { this.init(); } catch (ComponentLookupException e) { Assert.fail(e.getMessage()); } }
public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type ) throws MavenEmbedderException { try { RepositorySystem repositorySystem = lookup( RepositorySystem.class ); return repositorySystem.createArtifact( groupId, artifactId, version, scope, type ); } catch ( ComponentLookupException e ) { throw new MavenEmbedderException(e.getMessage(), e); } }
public Artifact createArtifactWithClassifier(String groupId, String artifactId, String version, String type, String classifier) throws MavenEmbedderException { try { RepositorySystem repositorySystem = lookup(RepositorySystem.class); return repositorySystem.createArtifactWithClassifier(groupId, artifactId, version, type, classifier); } catch (ComponentLookupException e) { throw new MavenEmbedderException(e.getMessage(), e); } }
public Artifact createArtifactWithClassifier( String groupId, String artifactId, String version, String type, String classifier ) throws MavenEmbedderException { try { RepositorySystem repositorySystem = lookup( RepositorySystem.class ); return repositorySystem.createArtifactWithClassifier( groupId, artifactId, version, type, classifier ); } catch ( ComponentLookupException e ) { throw new MavenEmbedderException(e.getMessage(), e); } }
public Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type) throws MavenEmbedderException { try { RepositorySystem repositorySystem = lookup(RepositorySystem.class); return repositorySystem.createArtifact(groupId, artifactId, version, scope, type); } catch (ComponentLookupException e) { throw new MavenEmbedderException(e.getMessage(), e); } }