Class DefaultDependencyManager
- java.lang.Object
-
- org.eclipse.aether.util.graph.manager.AbstractDependencyManager
-
- org.eclipse.aether.util.graph.manager.DefaultDependencyManager
-
- All Implemented Interfaces:
org.eclipse.aether.collection.DependencyManager
public final class DefaultDependencyManager extends AbstractDependencyManager
A dependency manager that applies management at all levels with aggressive transitive behavior.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:
ClassicDependencyManager,TransitiveDependencyManager
-
-
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
Constructors Constructor Description DefaultDependencyManager()Creates a new dependency manager without any management information.DefaultDependencyManager(org.eclipse.aether.scope.ScopeManager scopeManager)Creates a new dependency manager with aggressive management behavior.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.eclipse.aether.collection.DependencyManagernewInstance(MMap<AbstractDependencyManager.Key,java.lang.String> managedVersions, MMap<AbstractDependencyManager.Key,java.lang.String> managedScopes, MMap<AbstractDependencyManager.Key,java.lang.Boolean> managedOptionals, MMap<AbstractDependencyManager.Key,java.lang.String> managedLocalPaths, MMap<AbstractDependencyManager.Key,AbstractDependencyManager.Holder<java.util.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 Detail
-
DefaultDependencyManager
public DefaultDependencyManager()
Creates a new dependency manager without any management information.
-
DefaultDependencyManager
public DefaultDependencyManager(org.eclipse.aether.scope.ScopeManager scopeManager)
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 Detail
-
newInstance
protected org.eclipse.aether.collection.DependencyManager newInstance(MMap<AbstractDependencyManager.Key,java.lang.String> managedVersions, MMap<AbstractDependencyManager.Key,java.lang.String> managedScopes, MMap<AbstractDependencyManager.Key,java.lang.Boolean> managedOptionals, MMap<AbstractDependencyManager.Key,java.lang.String> managedLocalPaths, MMap<AbstractDependencyManager.Key,AbstractDependencyManager.Holder<java.util.Collection<org.eclipse.aether.graph.Exclusion>>> managedExclusions)
- Specified by:
newInstancein classAbstractDependencyManager
-
-