Class ClassicDependencyManager

  • All Implemented Interfaces:
    org.eclipse.aether.collection.DependencyManager

    public final class ClassicDependencyManager
    extends AbstractDependencyManager
    A dependency manager that mimics the way Maven 2.x works for backward compatibility.

    Overview

    This manager was used throughout all Maven 3.x versions for backward compatibility reasons. It provides the exact same dependency management behavior as Maven 2.x, which differs significantly from modern dependency management approaches.

    Key Characteristics

    • Exclusion Handling: Ignores exclusions introduced by direct dependencies
    • Management Scope: Only obeys root management, ignoring intermediate management
    • Depth Behavior: deriveUntil=2, applyFrom=2 with special "hop" at depth=1
    • Level 1 Skip: Ignores context from depth=1 for Maven 2.x compatibility

    When to Use

    Use this manager when you need exact Maven 2.x compatibility behavior or when working with legacy projects that depend on Maven 2.x dependency resolution semantics.

    Comparison with Other Managers

    Unlike TransitiveDependencyManager and DefaultDependencyManager, this manager deliberately ignores certain dependency management rules to maintain backward compatibility. See MavenITmng4720DependencyManagementExclusionMergeTest for behavioral differences.

    See Also:
    TransitiveDependencyManager, DefaultDependencyManager
    • Constructor Detail

      • ClassicDependencyManager

        public ClassicDependencyManager()
        Creates a new dependency manager without any management information.
      • ClassicDependencyManager

        public ClassicDependencyManager​(org.eclipse.aether.scope.ScopeManager scopeManager)
        Creates a new dependency manager without any management information.

        This constructor initializes the manager with Maven 2.x compatible behavior:

        • deriveUntil = 2 (collect rules only from root level)
        • applyFrom = 2 (apply rules starting from depth 2)
        • Special depth=1 handling for backward compatibility
        Parameters:
        scopeManager - application-specific scope manager for handling system dependencies, may be null to use legacy system dependency scope handling
        Since:
        2.0.12