Interface DependencyContainer

All Known Implementing Classes:
Dependencies, Dependency

public interface DependencyContainer
Common interface for Ant types that can contain Maven dependencies.

This interface is implemented by types such as Dependency and Dependencies to allow uniform handling of dependency validation within tasks like <resolve>, <install>, or <createPom>.

Implementations must provide a validate(Task) method that verifies their internal state is consistent and suitable for use during build execution.

Typical Implementations:

  • Dependency — defines a single Maven dependency
  • Dependencies — defines a container of dependencies, POMs, or exclusions
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    validate(org.apache.tools.ant.Task task)
    Validates the container's internal structure and attributes.
  • Method Details

    • validate

      void validate(org.apache.tools.ant.Task task)
      Validates the container's internal structure and attributes.

      This method is typically invoked by Ant tasks during execution to ensure that dependency definitions are well-formed, unambiguous, and do not conflict.

      Parameters:
      task - the Ant task requesting validation, typically used for error context
      Throws:
      org.apache.tools.ant.BuildException - if the container is misconfigured