Class DebugResolutionListener
- java.lang.Object
-
- org.apache.maven.artifact.resolver.DebugResolutionListener
-
- All Implemented Interfaces:
ResolutionListener,ResolutionListenerForDepMgmt
public class DebugResolutionListener extends java.lang.Object implements ResolutionListener, ResolutionListenerForDepMgmt
Send resolution events to the debug log.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Set<Artifact>ignoredArtifactsprivate java.lang.Stringindentprivate org.codehaus.plexus.logging.Loggerlogger-
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 voidendProcessChildren(Artifact artifact)voidincludeArtifact(Artifact artifact)voidmanageArtifact(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.voidmanageArtifactScope(Artifact artifact, Artifact replacement)voidmanageArtifactSystemPath(Artifact artifact, Artifact replacement)voidmanageArtifactVersion(Artifact artifact, Artifact replacement)voidomitForCycle(Artifact omitted)voidomitForNearer(Artifact omitted, Artifact kept)voidrestrictRange(Artifact artifact, Artifact replacement, VersionRange newRange)voidselectVersionFromRange(Artifact artifact)voidstartProcessChildren(Artifact artifact)voidtestArtifact(Artifact node)voidupdateScope(Artifact artifact, java.lang.String scope)voidupdateScopeCurrentPom(Artifact artifact, java.lang.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
-
-
-
Field Detail
-
logger
private org.codehaus.plexus.logging.Logger logger
-
indent
private java.lang.String indent
-
ignoredArtifacts
private static java.util.Set<Artifact> ignoredArtifacts
-
-
Method Detail
-
testArtifact
public void testArtifact(Artifact node)
- Specified by:
testArtifactin interfaceResolutionListener
-
startProcessChildren
public void startProcessChildren(Artifact artifact)
- Specified by:
startProcessChildrenin interfaceResolutionListener
-
endProcessChildren
public void endProcessChildren(Artifact artifact)
- Specified by:
endProcessChildrenin interfaceResolutionListener
-
includeArtifact
public void includeArtifact(Artifact artifact)
- Specified by:
includeArtifactin interfaceResolutionListener
-
omitForNearer
public void omitForNearer(Artifact omitted, Artifact kept)
- Specified by:
omitForNearerin interfaceResolutionListener
-
omitForCycle
public void omitForCycle(Artifact omitted)
- Specified by:
omitForCyclein interfaceResolutionListener
-
updateScopeCurrentPom
public void updateScopeCurrentPom(Artifact artifact, java.lang.String ignoredScope)
Description copied from interface:ResolutionListenerThis 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:
updateScopeCurrentPomin 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, java.lang.String scope)
- Specified by:
updateScopein interfaceResolutionListener
-
selectVersionFromRange
public void selectVersionFromRange(Artifact artifact)
- Specified by:
selectVersionFromRangein interfaceResolutionListener
-
restrictRange
public void restrictRange(Artifact artifact, Artifact replacement, VersionRange newRange)
- Specified by:
restrictRangein 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:
manageArtifactin interfaceResolutionListener
-
manageArtifactVersion
public void manageArtifactVersion(Artifact artifact, Artifact replacement)
- Specified by:
manageArtifactVersionin interfaceResolutionListenerForDepMgmt
-
manageArtifactScope
public void manageArtifactScope(Artifact artifact, Artifact replacement)
- Specified by:
manageArtifactScopein interfaceResolutionListenerForDepMgmt
-
manageArtifactSystemPath
public void manageArtifactSystemPath(Artifact artifact, Artifact replacement)
- Specified by:
manageArtifactSystemPathin interfaceResolutionListenerForDepMgmt
-
-