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

View File

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

View File

@ -25,7 +25,4 @@ package org.apache.maven.artifact.resolver;
public interface ArtifactResolver public interface ArtifactResolver
{ {
ArtifactResolutionResult resolve( ArtifactResolutionRequest request ); ArtifactResolutionResult resolve( ArtifactResolutionRequest request );
ArtifactResolutionResult resolveWithExceptions( ArtifactResolutionRequest request )
throws ArtifactResolutionException, ArtifactNotFoundException;
} }

View File

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