public final class ConflictResolver extends Object implements org.eclipse.aether.collection.DependencyGraphTransformer
ConflictResolver.VersionSelector, ConflictResolver.ScopeSelector, ConflictResolver.OptionalitySelector and
 ConflictResolver.ScopeDeriver.
 
 By default, this graph transformer will turn the dependency graph into a tree without duplicate artifacts. Using the
 configuration property CONFIG_PROP_VERBOSE, a verbose mode can be enabled where the graph is still turned
 into a tree but all nodes participating in a conflict are retained. The nodes that were rejected during conflict
 resolution have no children and link back to the winner node via the NODE_DATA_WINNER key in their custom
 data. Additionally, the keys NODE_DATA_ORIGINAL_SCOPE and NODE_DATA_ORIGINAL_OPTIONALITY are used
 to store the original scope and optionality of each node. Obviously, the resulting dependency tree is not suitable
 for artifact resolution unless a filter is employed to exclude the duplicate dependencies.
 
 This transformer will query the keys TransformationContextKeys.CONFLICT_IDS,
 TransformationContextKeys.SORTED_CONFLICT_IDS, TransformationContextKeys.CYCLIC_CONFLICT_IDS for
 existing information about conflict ids. In absence of this information, it will automatically invoke the
 ConflictIdSorter to calculate it.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | ConflictResolver.ConflictContextA context used to hold information that is relevant for resolving version and scope conflicts. | 
| static class  | ConflictResolver.ConflictItemA conflicting dependency. | 
| static class  | ConflictResolver.OptionalitySelectorAn extension point of  ConflictResolverthat determines the effective optional flag of a dependency from a
 potentially conflicting set of derived optionalities. | 
| static class  | ConflictResolver.ScopeContextA context used to hold information that is relevant for deriving the scope of a child dependency. | 
| static class  | ConflictResolver.ScopeDeriverAn extension point of  ConflictResolverthat determines the scope of a dependency in relation to the scope
 of its parent. | 
| static class  | ConflictResolver.ScopeSelectorAn extension point of  ConflictResolverthat determines the effective scope of a dependency from a
 potentially conflicting set ofderived scopes. | 
| static class  | ConflictResolver.VersionSelectorAn extension point of  ConflictResolverthat determines the winner among conflicting dependencies. | 
| Modifier and Type | Field and Description | 
|---|---|
| static String | CONFIG_PROP_VERBOSEThe key in the repository session's  configuration
 propertiesused to store aBooleanflag controlling the transformer's verbose mode. | 
| static String | NODE_DATA_ORIGINAL_OPTIONALITYThe key in the dependency node's  custom dataunder which the optional flag of
 the dependency before derivation and conflict resolution is stored. | 
| static String | NODE_DATA_ORIGINAL_SCOPEThe key in the dependency node's  custom dataunder which the scope of the
 dependency before scope derivation and conflict resolution is stored. | 
| static String | NODE_DATA_WINNERThe key in the dependency node's  custom dataunder which a reference to theDependencyNodewhich has won the conflict is stored. | 
| Constructor and Description | 
|---|
| ConflictResolver(ConflictResolver.VersionSelector versionSelector,
                                ConflictResolver.ScopeSelector scopeSelector,
                                ConflictResolver.OptionalitySelector optionalitySelector,
                                ConflictResolver.ScopeDeriver scopeDeriver)Creates a new conflict resolver instance with the specified hooks. | 
| Modifier and Type | Method and Description | 
|---|---|
| org.eclipse.aether.graph.DependencyNode | transformGraph(org.eclipse.aether.graph.DependencyNode node,
                            org.eclipse.aether.collection.DependencyGraphTransformationContext context) | 
public static final String CONFIG_PROP_VERBOSE
configuration
 properties used to store a Boolean flag controlling the transformer's verbose mode.public static final String NODE_DATA_WINNER
custom data under which a reference to the
 DependencyNode which has won the conflict is stored.public static final String NODE_DATA_ORIGINAL_SCOPE
custom data under which the scope of the
 dependency before scope derivation and conflict resolution is stored.public static final String NODE_DATA_ORIGINAL_OPTIONALITY
custom data under which the optional flag of
 the dependency before derivation and conflict resolution is stored.public ConflictResolver(ConflictResolver.VersionSelector versionSelector, ConflictResolver.ScopeSelector scopeSelector, ConflictResolver.OptionalitySelector optionalitySelector, ConflictResolver.ScopeDeriver scopeDeriver)
versionSelector - The version selector to use, must not be null.scopeSelector - The scope selector to use, must not be null.optionalitySelector - The optionality selector ot use, must not be null.scopeDeriver - The scope deriver to use, must not be null.public org.eclipse.aether.graph.DependencyNode transformGraph(org.eclipse.aether.graph.DependencyNode node, org.eclipse.aether.collection.DependencyGraphTransformationContext context) throws org.eclipse.aether.RepositoryException
transformGraph in interface org.eclipse.aether.collection.DependencyGraphTransformerorg.eclipse.aether.RepositoryExceptionCopyright © 2010–2018 The Apache Software Foundation. All rights reserved.