Class TransitiveDependencyManager

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

A dependency manager that provides proper transitive dependency management for modern Maven usage.

Overview

This manager implements proper "transitive dependency management" that works harmoniously with Maven's ModelBuilder. It produces more precise results regarding versions by respecting transitive management rules while allowing higher-level management to override lower-level rules.

Key Characteristics

  • Transitive Management: deriveUntil=Integer.MAX_VALUE, applyFrom=2
  • ModelBuilder Friendly: Works in conjunction with, not against, ModelBuilder
  • Inheritance Aware: Special handling for scope and optional properties
  • Precise Versioning: Obeys transitive management unless managed at higher levels

Inheritance Handling

This manager provides special care for "scope" and "optional" properties that are subject to inheritance in the dependency graph during later graph transformation steps. These properties are only derived from the root to prevent interference with inheritance logic.

When to Use

This is the recommended manager for modern Maven projects that need proper transitive dependency management while maintaining compatibility with Maven's ModelBuilder.

Comparison with Other Managers

Since:
1.4.0
Author:
Christian Schulte
See Also:
  • Constructor Details

    • TransitiveDependencyManager

      Deprecated.
      Use TransitiveDependencyManager(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.
    • TransitiveDependencyManager

      public TransitiveDependencyManager(org.eclipse.aether.scope.ScopeManager scopeManager)
      Creates a new transitive dependency manager with ModelBuilder-compatible behavior.

      This constructor initializes the manager with settings optimized for modern Maven usage:

      • deriveUntil = Integer.MAX_VALUE (collect management rules at all levels)
      • applyFrom = 2 (apply management starting from depth 2, respecting ModelBuilder)
      • Special inheritance handling for scope and optional properties
      Parameters:
      scopeManager - application-specific scope manager for handling system dependencies, may be null to use legacy system dependency scope handling
  • Method Details