Class DebugResolutionListener
- java.lang.Object
-
- org.apache.maven.artifact.resolver.DebugResolutionListener
-
- All Implemented Interfaces:
ResolutionListener
,ResolutionListenerForDepMgmt
public class DebugResolutionListener extends Object implements ResolutionListener, ResolutionListenerForDepMgmt
Send resolution events to the debug log.- Author:
- Brett Porter
-
-
Field Summary
-
Fields inherited from interface org.apache.maven.artifact.resolver.ResolutionListener
FINISH_PROCESSING_CHILDREN, INCLUDE_ARTIFACT, MANAGE_ARTIFACT, MANAGE_ARTIFACT_SCOPE, MANAGE_ARTIFACT_SYSTEM_PATH, MANAGE_ARTIFACT_VERSION, OMIT_FOR_CYCLE, OMIT_FOR_NEARER, PROCESS_CHILDREN, RESTRICT_RANGE, ROLE, SELECT_VERSION_FROM_RANGE, TEST_ARTIFACT, UPDATE_SCOPE, UPDATE_SCOPE_CURRENT_POM
-
-
Constructor Summary
Constructors Constructor Description DebugResolutionListener(org.codehaus.plexus.logging.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endProcessChildren(Artifact artifact)
void
includeArtifact(Artifact artifact)
void
manageArtifact(Artifact artifact, Artifact replacement)
The logic used here used to be a copy of the logic used in the DefaultArtifactCollector, and this method was called right before the actual version/artifactScope changes were done.void
manageArtifactScope(Artifact artifact, Artifact replacement)
void
manageArtifactSystemPath(Artifact artifact, Artifact replacement)
void
manageArtifactVersion(Artifact artifact, Artifact replacement)
void
omitForCycle(Artifact omitted)
void
omitForNearer(Artifact omitted, Artifact kept)
void
restrictRange(Artifact artifact, Artifact replacement, VersionRange newRange)
void
selectVersionFromRange(Artifact artifact)
void
startProcessChildren(Artifact artifact)
void
testArtifact(Artifact node)
void
updateScope(Artifact artifact, String scope)
void
updateScopeCurrentPom(Artifact artifact, String ignoredScope)
This event means that the artifactScope has NOT been updated to a farther node artifactScope because current node is in the first level pom
-
-
-
Method Detail
-
testArtifact
public void testArtifact(Artifact node)
- Specified by:
testArtifact
in interfaceResolutionListener
-
startProcessChildren
public void startProcessChildren(Artifact artifact)
- Specified by:
startProcessChildren
in interfaceResolutionListener
-
endProcessChildren
public void endProcessChildren(Artifact artifact)
- Specified by:
endProcessChildren
in interfaceResolutionListener
-
includeArtifact
public void includeArtifact(Artifact artifact)
- Specified by:
includeArtifact
in interfaceResolutionListener
-
omitForNearer
public void omitForNearer(Artifact omitted, Artifact kept)
- Specified by:
omitForNearer
in interfaceResolutionListener
-
omitForCycle
public void omitForCycle(Artifact omitted)
- Specified by:
omitForCycle
in interfaceResolutionListener
-
updateScopeCurrentPom
public void updateScopeCurrentPom(Artifact artifact, String ignoredScope)
Description copied from interface:ResolutionListener
This event means that the artifactScope has NOT been updated to a farther node artifactScope because current node is in the first level pom- Specified by:
updateScopeCurrentPom
in interfaceResolutionListener
- Parameters:
artifact
- current node artifact, the one in the first level pomignoredScope
- artifactScope that was ignored because artifact was in first level pom
-
updateScope
public void updateScope(Artifact artifact, String scope)
- Specified by:
updateScope
in interfaceResolutionListener
-
selectVersionFromRange
public void selectVersionFromRange(Artifact artifact)
- Specified by:
selectVersionFromRange
in interfaceResolutionListener
-
restrictRange
public void restrictRange(Artifact artifact, Artifact replacement, VersionRange newRange)
- Specified by:
restrictRange
in interfaceResolutionListener
-
manageArtifact
public void manageArtifact(Artifact artifact, Artifact replacement)
The logic used here used to be a copy of the logic used in the DefaultArtifactCollector, and this method was called right before the actual version/artifactScope changes were done. However, a different set of conditionals (and more information) is needed to be able to determine when and if the version and/or artifactScope changes. See the two added methods, manageArtifactVersion and manageArtifactScope.- Specified by:
manageArtifact
in interfaceResolutionListener
-
manageArtifactVersion
public void manageArtifactVersion(Artifact artifact, Artifact replacement)
- Specified by:
manageArtifactVersion
in interfaceResolutionListenerForDepMgmt
-
manageArtifactScope
public void manageArtifactScope(Artifact artifact, Artifact replacement)
- Specified by:
manageArtifactScope
in interfaceResolutionListenerForDepMgmt
-
manageArtifactSystemPath
public void manageArtifactSystemPath(Artifact artifact, Artifact replacement)
- Specified by:
manageArtifactSystemPath
in interfaceResolutionListenerForDepMgmt
-
-