Java 类org.apache.maven.project.DependencyResolutionRequest 实例源码

项目:pipeline-maven-plugin    文件:DependencyResolutionRequestHandler.java   
@Override
protected boolean _handle(DependencyResolutionRequest request) {
    Xpp3Dom root = new Xpp3Dom("DependencyResolutionRequest");
    root.setAttribute("class", request.getClass().getName());
    root.addChild(newElement("project", request.getMavenProject()));

    reporter.print(root);
    return true;
}
项目:oceano    文件:ProjectDependenciesResolverStub.java   
public DependencyResolutionResult resolve( DependencyResolutionRequest request )
    throws DependencyResolutionException
{
    return new DependencyResolutionResult()
    {

        public List<Dependency> getUnresolvedDependencies()
        {
            return Collections.emptyList();
        }

        public List<Dependency> getResolvedDependencies()
        {
            return Collections.emptyList();
        }

        public List<Exception> getResolutionErrors( Dependency dependency )
        {
            return Collections.emptyList();
        }

        public DependencyNode getDependencyGraph()
        {
            return new DefaultDependencyNode( (Dependency) null );
        }

        public List<Dependency> getDependencies()
        {
            return Collections.emptyList();
        }

        public List<Exception> getCollectionErrors()
        {
            return Collections.emptyList();
        }
    };
}
项目:maven-parallel-resolver    文件:SynchronizedProjectDependenciesResolver.java   
public DependencyResolutionResult resolve( DependencyResolutionRequest request )
    throws DependencyResolutionException
{
    synchronized ( SynchronizedProjectDependenciesResolver.class )
    {
        return super.resolve( request );
    }
}
项目:maven-buildtime-profiler    文件:BuildTimeProfiler.java   
@Override
public void onEvent( Object event )
    throws Exception
{
    try
    {
        if ( event instanceof ExecutionEvent )
        {
            executionEventHandler( (ExecutionEvent) event );
        }
        else if ( event instanceof org.eclipse.aether.RepositoryEvent )
        {
            repositoryEventHandler( (RepositoryEvent) event );
        }
        else if ( event instanceof MavenExecutionRequest )
        {
            executionRequestEventHandler( (MavenExecutionRequest) event );
        }
        else if ( event instanceof MavenExecutionResult )
        {
            executionResultEventHandler( (MavenExecutionResult) event );
        }
        else if ( event instanceof DependencyResolutionRequest )
        {
            dependencyResolutionRequest( (DependencyResolutionRequest) event );
        }
        else if ( event instanceof DependencyResolutionResult )
        {
            dependencyResolutionResult( (DependencyResolutionResult) event );
        }
        // The following event type is available since Maven 3.3.1+
        // else if ( event instanceof DefaultSettingsBuildingRequest) {
        // DefaultSettingsBuildingRequest r = null;
        // r.getGlobalSettingsFile();
        // r.getGlobalSettingsSource();
        // r.getSystemProperties();
        // r.getUserSettingsFile();
        // r.getUserSettingsSource();
        //
        // r.setGlobalSettingsFile( globalSettingsFile );
        // r.setGlobalSettingsSource( globalSettingsSource );
        // r.setSystemProperties( systemProperties );
        // r.setUserProperties( userProperties );
        // r.setUserSettingsFile( userSettingsFile );
        // r.setUserSettingsSource( userSettingsSource );
        // }
        // The following event type is available since Maven 3.3.1+
        // else if (event instanceof DefaultSettingsBuildingRequest) {
        //
        // DefaultSettingsBuildingRequest r = null;
        // r.getGlobalSettingsSource().getLocation()
        // }
        // The following event type is available since Maven 3.3.1+
        // else if (event instanceof DefaultToolchainsBuildingRequest) {
        // DefaultToolchainsBuildingRequest r = null;
        // r.getGlobalToolchainsSource().
        // }
        // The following event type is available since Maven 3.3.1+
        // else if (event instanceof DefaultToolchainsBuildingResult) {
        // DefaultToolchainsBuildingResult r = null;
        // r.getEffectiveToolchains();
        // r.getProblems();
        // }
        else
        {
            // TODO: What kind of event we haven't considered?
            LOGGER.debug( "MBTP: Event {}", event.getClass().getCanonicalName() );
        }
    }
    catch ( Exception e )
    {
        LOGGER.error( "MBTP: Exception", e );
    }
}
项目:maven-buildtime-profiler    文件:BuildTimeProfiler.java   
private void dependencyResolutionRequest( DependencyResolutionRequest event )
{
    LOGGER.debug( "MBTP: dependencyResolutionRequest()" );
}