Package org.apache.maven.plugin.internal
Class PluginDependencyResolutionListener
java.lang.Object
org.apache.maven.plugin.internal.PluginDependencyResolutionListener
- All Implemented Interfaces:
ResolutionListener
Assists in detecting wagon providers brought into the plugin class path via legacy Maven core artifacts (e.g.
maven-core:2.0.6) and excluding them. A plugin should be able to explicitly declare dependencies on specific wagons
for its use. However, the (old) wagons pulled in transitively via legacy Maven core artifacts are usually not
intended as dependencies and more importantly screw up artifact resolution because they would get preferred over the
core wagon versions. This is a hack to provide backward-compat with Maven 2 (MNG-4528, MNG-4561).
- Since:
- 3.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LinkedList<Artifact> private ArtifactFilterprivate ArtifactFields 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidendProcessChildren(Artifact artifact) voidincludeArtifact(Artifact artifact) private booleanisLegacyCoreArtifact(Artifact artifact) private booleanisWagonProvider(Artifact artifact) voidmanageArtifact(Artifact artifact, Artifact replacement) voidomitForCycle(Artifact artifact) voidomitForNearer(Artifact omitted, Artifact kept) voidremoveBannedDependencies(Collection<Artifact> artifacts) voidrestrictRange(Artifact artifact, Artifact replacement, VersionRange newRange) voidselectVersionFromRange(Artifact artifact) voidstartProcessChildren(Artifact artifact) voidtestArtifact(Artifact node) voidupdateScope(Artifact artifact, String scope) voidupdateScopeCurrentPom(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
-
Field Details
-
coreFilter
-
coreArtifacts
-
wagonProvider
-
bannedArtifacts
-
-
Constructor Details
-
PluginDependencyResolutionListener
PluginDependencyResolutionListener(ArtifactFilter coreFilter)
-
-
Method Details
-
removeBannedDependencies
-
startProcessChildren
- Specified by:
startProcessChildrenin interfaceResolutionListener
-
isLegacyCoreArtifact
-
endProcessChildren
- Specified by:
endProcessChildrenin interfaceResolutionListener
-
includeArtifact
- Specified by:
includeArtifactin interfaceResolutionListener
-
isWagonProvider
-
manageArtifact
- Specified by:
manageArtifactin interfaceResolutionListener
-
omitForCycle
- Specified by:
omitForCyclein interfaceResolutionListener
-
omitForNearer
- Specified by:
omitForNearerin interfaceResolutionListener
-
restrictRange
- Specified by:
restrictRangein interfaceResolutionListener
-
selectVersionFromRange
- Specified by:
selectVersionFromRangein interfaceResolutionListener
-
testArtifact
- Specified by:
testArtifactin interfaceResolutionListener
-
updateScope
- Specified by:
updateScopein interfaceResolutionListener
-
updateScopeCurrentPom
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
-