Class ClassicDependencyManager

java.lang.Object
org.eclipse.aether.util.graph.manager.AbstractDependencyManager
org.eclipse.aether.util.graph.manager.ClassicDependencyManager
All Implemented Interfaces:
org.eclipse.aether.collection.DependencyManager

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:
  • Constructor Details

    • ClassicDependencyManager

      Deprecated.
      Use ClassicDependencyManager(ScopeManager) instead to provide application-specific scope management. This constructor uses legacy system dependency scope handling which may not be appropriate for all use cases.
      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
  • Method Details