public void executeTask( DependencyGraph graph )
{
DependencyGraphWalker walker = new WalkDepthFirstSearch();
RefineConflictsVisitor refineConflictsVisitor = new RefineConflictsVisitor();
MultiValueMap depMap = new MultiValueMap();
// Identify deps that need to be resolved.
for ( DependencyGraphNode node : graph.getNodes() )
{
String key = DependencyGraphKeys.toManagementKey( node.getArtifact() );
// This will add this node to the specified key, not replace a previous one.
depMap.put( key, node );
}
// Process those depMap entries with more than 1 value.
ToArtifactReferenceTransformer nodeToArtifact = new ToArtifactReferenceTransformer();
Iterator<Map.Entry<String,Collection<DependencyGraphNode>>> it = depMap.entrySet().iterator();
while ( it.hasNext() )
{
Map.Entry<String,Collection<DependencyGraphNode>> entry = it.next();
Collection<DependencyGraphNode> nodes = entry.getValue();
if ( nodes.size() > 1 )