Merging r548797 from 2.0.x:

Make DefaultArtifactCollector fire OMIT_FOR_NEARER events to listeners even if the artifact versions do not differ.  This allows interested listeners to be able to track omitted duplicate artifacts.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@548799 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Hobson 2007-06-19 16:54:44 +00:00
parent b79759f338
commit db111e752a
1 changed files with 1 additions and 6 deletions

View File

@ -484,12 +484,7 @@ public class DefaultArtifactCollector
listener.includeArtifact( node.getArtifact() );
break;
case ResolutionListener.OMIT_FOR_NEARER:
String version = node.getArtifact().getVersion();
String replacementVersion = replacement.getVersion();
if ( version != null ? !version.equals( replacementVersion ) : replacementVersion != null )
{
listener.omitForNearer( node.getArtifact(), replacement );
}
break;
case ResolutionListener.OMIT_FOR_CYCLE:
listener.omitForCycle( node.getArtifact() );