Package org.mule.maven.client.internal
Class ParentContextDependencyGraphTransformer
java.lang.Object
org.mule.maven.client.internal.GraphCycleAvoidingTransformer
org.mule.maven.client.internal.ParentContextDependencyGraphTransformer
- All Implemented Interfaces:
org.eclipse.aether.collection.DependencyGraphTransformer
- Direct Known Subclasses:
ApiDependencyGraphTransformer,MulePluginDependencyGraphTransformer
Mark all dependencies that belong to an specific type of parent to prevent the Maven conflict resolution from removing
replicates when they belong to different parents.
- Since:
- 1.5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected abstract StringKey to store ancestors of this node that define it's contextinthashCode()protected abstract booleanisChildNode(org.eclipse.aether.graph.DependencyNode childNode) Returns if the node should be marked as a child node.protected abstract booleanisSelectableParent(org.eclipse.aether.graph.DependencyNode dependencyNode) Returntrueif the node should be selected as parent and all children should be considered in it's context/protected voidmarkChildNode(org.eclipse.aether.graph.DependencyNode childNode, Optional<org.eclipse.aether.graph.DependencyNode> parent) protected voidtransformNode(org.eclipse.aether.graph.DependencyNode node) Methods inherited from class org.mule.maven.client.internal.GraphCycleAvoidingTransformer
transformGraph
-
Constructor Details
-
ParentContextDependencyGraphTransformer
public ParentContextDependencyGraphTransformer()
-
-
Method Details
-
transformNode
protected void transformNode(org.eclipse.aether.graph.DependencyNode node) - Specified by:
transformNodein classGraphCycleAvoidingTransformer
-
markChildNode
protected void markChildNode(org.eclipse.aether.graph.DependencyNode childNode, Optional<org.eclipse.aether.graph.DependencyNode> parent) -
isSelectableParent
protected abstract boolean isSelectableParent(org.eclipse.aether.graph.DependencyNode dependencyNode) Returntrueif the node should be selected as parent and all children should be considered in it's context/- Parameters:
dependencyNode- the node to evaluate as parent.- Returns:
- true if the node should be considered as context parent
-
isChildNode
protected abstract boolean isChildNode(org.eclipse.aether.graph.DependencyNode childNode) Returns if the node should be marked as a child node. That means that it belongs to a parent's context- Parameters:
childNode- the node to evaluate as child node- Returns:
- true if the node belongs to a parent context
-
getAncestorKey
Key to store ancestors of this node that define it's context- Returns:
- the key used to store node ancestors
-
equals
-
hashCode
public int hashCode()
-