o further culling fields from the resolution request

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@749484 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2009-03-03 00:14:44 +00:00
parent ed6f76548b
commit 781d7091cb
4 changed files with 14 additions and 28 deletions

View File

@ -1,16 +1,15 @@
package org.apache.maven.artifact.resolver;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
import org.apache.maven.artifact.resolver.conflict.ConflictResolver;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
/**
* A resolution request allows you to either use an existing MavenProject, or a coordinate (gid:aid:version)
* to process a POMs dependencies.
@ -21,20 +20,25 @@ public class ArtifactResolutionRequest
{
private Artifact artifact;
// Needs to go away
private Set<Artifact> artifactDependencies;
private ArtifactRepository localRepository;
private List<ArtifactRepository> remoteRepositories;
// Not sure what to do with this?
// Scope
// Lock down lists
private ArtifactFilter filter;
// Needs to go away
private List<ResolutionListener> listeners = new ArrayList<ResolutionListener>();
// This is like a filter but overrides all transitive versions
private Map managedVersionMap;
private List<ConflictResolver> conflictResolvers;
// This should not be in here, it's a component
private ArtifactMetadataSource metadataSource;
public ArtifactResolutionRequest()
@ -155,18 +159,6 @@ public class ArtifactResolutionRequest
return this;
}
public List<ConflictResolver> getConflictResolvers()
{
return conflictResolvers;
}
public ArtifactResolutionRequest setConflictResolvers( List<ConflictResolver> conflictResolvers )
{
this.conflictResolvers = conflictResolvers;
return this;
}
public String toString()
{
StringBuffer sb = new StringBuffer()

View File

@ -40,7 +40,6 @@ import java.util.Set;
* - file system errors: permissions
*
* @author Jason van Zyl
* @version $Id$
* @TODO carlos: all these possible has*Exceptions and get*Exceptions methods make the clients too
* complex requiring a long list of checks, need to create a parent/interfact/encapsulation
* for the types of exceptions
@ -49,7 +48,6 @@ public class ArtifactResolutionResult
{
private Artifact originatingArtifact;
private List<Artifact> missingArtifacts;
// Exceptions

View File

@ -24,8 +24,5 @@ package org.apache.maven.artifact.resolver;
*/
public interface ArtifactResolver
{
ArtifactResolutionResult resolve( ArtifactResolutionRequest request );
ArtifactResolutionResult resolveWithExceptions( ArtifactResolutionRequest request )
throws ArtifactResolutionException, ArtifactNotFoundException;
ArtifactResolutionResult resolve( ArtifactResolutionRequest request );
}

View File

@ -303,8 +303,7 @@ public class DefaultArtifactResolver
.setRemoteRepostories( remoteRepositories )
.setMetadataSource( source )
.setFilter( filter )
.setListeners( listeners )
.setConflictResolvers( conflictResolvers );
.setListeners( listeners );
return resolveWithExceptions( request );
}