org.apache.maven.repository.metadata
Class DefaultGraphConflictResolver

java.lang.Object
  extended by org.apache.maven.repository.metadata.DefaultGraphConflictResolver
All Implemented Interfaces:
GraphConflictResolver

@Component(role=GraphConflictResolver.class)
public class DefaultGraphConflictResolver
extends Object
implements GraphConflictResolver

Default conflict resolver.Implements closer newer first policy by default, but could be configured via plexus

Author:
Oleg Gusakov

Field Summary
protected  GraphConflictResolutionPolicy policy
          artifact, closer to the entry point, is selected
 
Fields inherited from interface org.apache.maven.repository.metadata.GraphConflictResolver
ROLE
 
Constructor Summary
DefaultGraphConflictResolver()
           
 
Method Summary
 MetadataGraph resolveConflicts(MetadataGraph graph, ArtifactScopeEnum scope)
          Cleanses the supplied graph by leaving only one directed versioned edge\ between any two nodes, if multiple exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

policy

@Requirement(role=GraphConflictResolutionPolicy.class)
protected GraphConflictResolutionPolicy policy
artifact, closer to the entry point, is selected

Constructor Detail

DefaultGraphConflictResolver

public DefaultGraphConflictResolver()
Method Detail

resolveConflicts

public MetadataGraph resolveConflicts(MetadataGraph graph,
                                      ArtifactScopeEnum scope)
                               throws GraphConflictResolutionException
Description copied from interface: GraphConflictResolver
Cleanses the supplied graph by leaving only one directed versioned edge\ between any two nodes, if multiple exists. Uses scope relationships, defined in ArtifactScopeEnum

Specified by:
resolveConflicts in interface GraphConflictResolver
Parameters:
graph - the "dirty" graph to be simplified via conflict resolution
scope - scope for which the graph should be resolved
Returns:
resulting "clean" graph for the specified scope
Throws:
GraphConflictResolutionException


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.