1 package org.apache.maven.artifact.resolver; 2 3 18 19 import org.apache.maven.artifact.Artifact; 20 import org.apache.maven.artifact.versioning.VersionRange; 21 import org.codehaus.plexus.logging.Logger; 22 23 import java.util.HashSet ; 24 import java.util.Set ; 25 26 32 public class WarningResolutionListener 33 implements ResolutionListener 34 { 35 private Logger logger; 36 37 private static Set ignoredArtifacts = new HashSet (); 38 39 public WarningResolutionListener( Logger logger ) 40 { 41 this.logger = logger; 42 } 43 44 public void testArtifact( Artifact node ) 45 { 46 } 47 48 public void startProcessChildren( Artifact artifact ) 49 { 50 } 51 52 public void endProcessChildren( Artifact artifact ) 53 { 54 } 55 56 public void includeArtifact( Artifact artifact ) 57 { 58 } 59 60 public void omitForNearer( Artifact omitted, Artifact kept ) 61 { 62 } 63 64 public void omitForCycle( Artifact omitted ) 65 { 66 } 67 68 public void updateScopeCurrentPom( Artifact artifact, String scope ) 69 { 70 if ( !ignoredArtifacts.contains( artifact ) ) 72 { 73 logger.warn( "\n\tArtifact " + artifact + " retains local scope '" + artifact.getScope() + 74 "' overriding broader scope '" + scope + "'\n" + 75 "\tgiven by a dependency. If this is not intended, modify or remove the local scope.\n" ); 76 ignoredArtifacts.add( artifact ); 77 } 78 } 79 80 public void updateScope( Artifact artifact, String scope ) 81 { 82 } 83 84 public void manageArtifact( Artifact artifact, Artifact replacement ) 85 { 86 } 87 88 public void selectVersionFromRange( Artifact artifact ) 89 { 90 } 91 92 public void restrictRange( Artifact artifact, Artifact replacement, VersionRange newRange ) 93 { 94 } 95 } 96 | Popular Tags |