o Accounted for refactoring of aether-api/-util

This commit is contained in:
Benjamin Bentmann 2012-03-10 17:41:02 +01:00
parent 298403bed3
commit 25a273f744
3 changed files with 9 additions and 4 deletions

View File

@ -87,6 +87,7 @@ import org.eclipse.aether.repository.Authentication;
import org.eclipse.aether.repository.LocalRepository;
import org.eclipse.aether.repository.RepositoryPolicy;
import org.eclipse.aether.repository.WorkspaceReader;
import org.eclipse.aether.resolution.ResolutionErrorPolicy;
import org.eclipse.aether.util.graph.manager.ClassicDependencyManager;
import org.eclipse.aether.util.graph.selector.AndDependencySelector;
import org.eclipse.aether.util.graph.selector.ExclusionDependencySelector;
@ -102,6 +103,7 @@ import org.eclipse.aether.util.repository.ChainedWorkspaceReader;
import org.eclipse.aether.util.repository.DefaultAuthenticationSelector;
import org.eclipse.aether.util.repository.DefaultMirrorSelector;
import org.eclipse.aether.util.repository.DefaultProxySelector;
import org.eclipse.aether.util.repository.SimpleResolutionErrorPolicy;
/**
* @author Jason van Zyl
@ -360,8 +362,11 @@ public class DefaultMaven
session.setUpdatePolicy( null );
}
session.setNotFoundCachingEnabled( request.isCacheNotFound() );
session.setTransferErrorCachingEnabled( request.isCacheTransferError() );
int errorPolicy = 0;
errorPolicy |= request.isCacheNotFound() ? ResolutionErrorPolicy.CACHE_NOT_FOUND : 0;
errorPolicy |= request.isCacheTransferError() ? ResolutionErrorPolicy.CACHE_TRANSFER_ERROR : 0;
session.setResolutionErrorPolicy( new SimpleResolutionErrorPolicy( errorPolicy, errorPolicy
| ResolutionErrorPolicy.CACHE_NOT_FOUND ) );
session.setArtifactTypeRegistry( RepositoryUtils.newArtifactTypeRegistry( artifactHandlerManager ) );

View File

@ -92,7 +92,7 @@ import org.eclipse.aether.graph.DependencyFilter;
import org.eclipse.aether.graph.DependencyNode;
import org.eclipse.aether.repository.RemoteRepository;
import org.eclipse.aether.util.filter.AndDependencyFilter;
import org.eclipse.aether.util.graph.PreorderNodeListGenerator;
import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
/**
* Provides basic services to manage Maven plugins and their mojos. This component is kept general in its design such

View File

@ -57,7 +57,7 @@ import org.eclipse.aether.graph.DependencyFilter;
import org.eclipse.aether.graph.DependencyNode;
import org.eclipse.aether.repository.RemoteRepository;
import org.eclipse.aether.util.filter.ExclusionsDependencyFilter;
import org.eclipse.aether.util.graph.PreorderNodeListGenerator;
import org.eclipse.aether.util.graph.visitor.PreorderNodeListGenerator;
/**
* Assists the project builder. <strong>Warning:</strong> This is an internal utility class that is only public for