org.sonatype.aether.util.graph.transformer
Class NearestVersionConflictResolver

java.lang.Object
  extended by org.sonatype.aether.util.graph.transformer.NearestVersionConflictResolver
All Implemented Interfaces:
DependencyGraphTransformer

public class NearestVersionConflictResolver
extends Object
implements DependencyGraphTransformer

A dependency graph transformer that resolves version conflicts using the nearest-wins strategy. For a given set of conflicting nodes, one node will be chosen as the winner and the other nodes are removed from the dependency graph. This transformer will query the keys TransformationContextKeys.CONFLICT_IDS and TransformationContextKeys.SORTED_CONFLICT_IDS for existing information about conflict ids. In absence of this information, it will automatically invoke the ConflictIdSorter to calculate it.

Author:
Benjamin Bentmann

Constructor Summary
NearestVersionConflictResolver()
           
 
Method Summary
 DependencyNode transformGraph(DependencyNode node, DependencyGraphTransformationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NearestVersionConflictResolver

public NearestVersionConflictResolver()
Method Detail

transformGraph

public DependencyNode transformGraph(DependencyNode node,
                                     DependencyGraphTransformationContext context)
                              throws RepositoryException
Specified by:
transformGraph in interface DependencyGraphTransformer
Throws:
RepositoryException


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.