Interface ArtifactContainer

All Known Implementing Classes:
Artifact, Artifacts

public interface ArtifactContainer
Represents a collection of one or more Artifact instances in an Ant build context.

This interface is implemented by Ant types that logically group or provide access to Maven artifacts, such as Artifact, Artifacts, or other custom container types.

Implementations must be able to:

  • Validate their internal artifact structure for consistency and completeness.
  • Return all artifacts they contain for further processing (e.g., deployment, installation).

Known Implementations:

  • Artifact — represents a single Maven artifact
  • Artifacts — represents a group of artifacts or nested artifact containers

This interface is typically used by Ant tasks such as Install and Deploy.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a flat list of all Artifact instances in this container.
    void
    validate(org.apache.tools.ant.Task task)
    Validates the artifact(s) within this container.
  • Method Details

    • validate

      void validate(org.apache.tools.ant.Task task)
      Validates the artifact(s) within this container.
      Parameters:
      task - the Ant task requesting validation; used for context or error reporting
      Throws:
      org.apache.tools.ant.BuildException - if any artifact is invalid or required attributes are missing
    • getArtifacts

      List<Artifact> getArtifacts()
      Returns a flat list of all Artifact instances in this container.
      Returns:
      a list of artifacts; never null, but may be empty