{
collect.addManagedDependency( RepositoryUtils.toDependency( dependency, stereotypes ) );
}
}
DependencyNode node;
try
{
node = repoSystem.collectDependencies( session, collect ).getRoot();
result.setDependencyGraph( node );
}
catch ( DependencyCollectionException e )
{
result.setDependencyGraph( e.getResult().getRoot() );
result.setCollectionErrors( e.getResult().getExceptions() );
throw new DependencyResolutionException( result, "Could not resolve dependencies for project "
+ project.getId() + ": " + e.getMessage(), e );
}
if ( logger.isWarnEnabled() )
{
for ( DependencyNode child : node.getChildren() )
{
if ( !child.getRelocations().isEmpty() )
{
logger.warn( "The artifact " + child.getRelocations().get( 0 ) + " has been relocated to "
+ child.getDependency().getArtifact() );
}
}
}
if ( logger.isDebugEnabled() )
{
node.accept( new GraphLogger( project ) );
}
try
{
process( result, repoSystem.resolveDependencies( session, node, filter ) );