public void resolve() throws DependencyCollectionException, DependencyResolutionException {
if (dependencies.size() == 0){
throw new IllegalArgumentException("no artifacts given");
}
CollectRequest collectRequest = new CollectRequest();
for( Dependency dependency: dependencies ){
collectRequest.addDependency( dependency );
}
for( RemoteRepository r: repos ){
RemoteRepository mirror = settings.getMirrorSelector().getMirror( r );
if ( mirror != null )
{
r = mirror;
}
Proxy proxy = settings.getProxySelector().getProxy( r );if ( proxy != null )
{
Builder builder = new RemoteRepository.Builder( r );
builder.setProxy( proxy );
r = builder.build();
}
collectRequest.addRepository( r );
}
this.node = repoSystem.collectDependencies( getSession(), collectRequest ).getRoot();
DependencyRequest dependencyRequest = new DependencyRequest( this.node, null );