Class DefaultDependencyManager
- All Implemented Interfaces:
org.eclipse.aether.collection.DependencyManager
Overview
This manager provides the most aggressive dependency management approach, applying management rules at every level of the dependency graph. Unlike other managers, it starts applying management from the very first level (depth=0) and continues indefinitely.
Key Characteristics
- Aggressive Application:
deriveUntil=Integer.MAX_VALUE
,applyFrom=0
- First Level Management: Applies management even at the root level
- ModelBuilder Interference: Ignores and overrides ModelBuilder's work
- Complete Transitivity: Manages dependencies at all depths
When NOT to Use
⚠️ Warning: This manager is not recommended for Maven or Maven-like use cases because it interferes with ModelBuilder, potentially rewriting models that ModelBuilder has already processed correctly. This can lead to unexpected dependency resolution behavior.
When to Use
Consider this manager only for non-Maven scenarios where you need complete control over dependency management at all levels and are not using Maven's ModelBuilder.
Comparison with Other Managers
ClassicDependencyManager
: Maven 2.x compatibility, limited scopeTransitiveDependencyManager
: Proper transitive management, ModelBuilder-friendly- This manager: Aggressive, all-level management (use with caution)
- Since:
- 1.4.0
- Author:
- Christian Schulte
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.aether.util.graph.manager.AbstractDependencyManager
AbstractDependencyManager.Holder<T>, AbstractDependencyManager.Key
-
Field Summary
Fields inherited from class org.eclipse.aether.util.graph.manager.AbstractDependencyManager
applyFrom, depth, deriveUntil, managedExclusions, managedLocalPaths, managedOptionals, managedScopes, managedVersions, path, systemDependencyScope
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.DefaultDependencyManager
(org.eclipse.aether.scope.ScopeManager scopeManager) Creates a new dependency manager with aggressive management behavior. -
Method Summary
Modifier and TypeMethodDescriptionprotected org.eclipse.aether.collection.DependencyManager
newInstance
(MMap<AbstractDependencyManager.Key, String> managedVersions, MMap<AbstractDependencyManager.Key, String> managedScopes, MMap<AbstractDependencyManager.Key, Boolean> managedOptionals, MMap<AbstractDependencyManager.Key, String> managedLocalPaths, MMap<AbstractDependencyManager.Key, AbstractDependencyManager.Holder<Collection<org.eclipse.aether.graph.Exclusion>>> managedExclusions) Methods inherited from class org.eclipse.aether.util.graph.manager.AbstractDependencyManager
deriveChildManager, equals, hashCode, isApplied, isDerived, isInheritedDerived, manageDependency
-
Constructor Details
-
DefaultDependencyManager
Deprecated.UseDefaultDependencyManager(ScopeManager)
instead to provide application-specific scope management. This constructor uses legacy system dependency scope handling.Creates a new dependency manager without any management information. -
DefaultDependencyManager
Creates a new dependency manager with aggressive management behavior.⚠️ Warning: This manager is not recommended for Maven use cases. It initializes with the most aggressive settings:
- deriveUntil = Integer.MAX_VALUE (always collect management rules)
- applyFrom = 0 (apply management from the very first level)
- No respect for ModelBuilder's work
- Parameters:
scopeManager
- application-specific scope manager for handling system dependencies, may be null to use legacy system dependency scope handling
-
-
Method Details
-
newInstance
protected org.eclipse.aether.collection.DependencyManager newInstance(MMap<AbstractDependencyManager.Key, String> managedVersions, MMap<AbstractDependencyManager.Key, String> managedScopes, MMap<AbstractDependencyManager.Key, Boolean> managedOptionals, MMap<AbstractDependencyManager.Key, String> managedLocalPaths, MMap<AbstractDependencyManager.Key, AbstractDependencyManager.Holder<Collection<org.eclipse.aether.graph.Exclusion>>> managedExclusions) - Specified by:
newInstance
in classAbstractDependencyManager
-
DefaultDependencyManager(ScopeManager)
instead to provide application-specific scope management.