Package org.apache.maven.plugin.internal
Class WagonExcluder
- java.lang.Object
-
- org.apache.maven.plugin.internal.WagonExcluder
-
- All Implemented Interfaces:
org.eclipse.aether.collection.DependencySelector
class WagonExcluder extends java.lang.Object implements org.eclipse.aether.collection.DependencySelectorAssists 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).
-
-
Field Summary
Fields Modifier and Type Field Description private booleancoreArtifact
-
Constructor Summary
Constructors Modifier Constructor Description (package private)WagonExcluder()privateWagonExcluder(boolean coreArtifact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.eclipse.aether.collection.DependencySelectorderiveChildSelector(org.eclipse.aether.collection.DependencyCollectionContext context)booleanequals(java.lang.Object obj)inthashCode()private booleanisLegacyCoreArtifact(org.eclipse.aether.artifact.Artifact artifact)private booleanisWagonProvider(org.eclipse.aether.artifact.Artifact artifact)booleanselectDependency(org.eclipse.aether.graph.Dependency dependency)
-
-
-
Method Detail
-
selectDependency
public boolean selectDependency(org.eclipse.aether.graph.Dependency dependency)
- Specified by:
selectDependencyin interfaceorg.eclipse.aether.collection.DependencySelector
-
deriveChildSelector
public org.eclipse.aether.collection.DependencySelector deriveChildSelector(org.eclipse.aether.collection.DependencyCollectionContext context)
- Specified by:
deriveChildSelectorin interfaceorg.eclipse.aether.collection.DependencySelector
-
isLegacyCoreArtifact
private boolean isLegacyCoreArtifact(org.eclipse.aether.artifact.Artifact artifact)
-
isWagonProvider
private boolean isWagonProvider(org.eclipse.aether.artifact.Artifact artifact)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-