Interface DependencyCoordinates

All Superinterfaces:
ArtifactCoordinates
All Known Implementing Classes:
DefaultDependencyCoordinates

@Experimental @Immutable public interface DependencyCoordinates extends ArtifactCoordinates
ArtifactCoordinates completed with information about how the artifact will be used. This information include the dependency type (main classes, test classes, etc.), a scope (compile-time, run-time etc.), an obligation (whether the dependency is optional or mandatory), and possible exclusions for transitive dependencies. The version and the obligation may not be defined precisely.
Since:
4.0.0
  • Method Details

    • getType

      @Nonnull Type getType()
      Returns the type of the dependency. A dependency can be a JAR file, a modular-JAR if it is intended to be placed on the module-path, a JAR containing test classes, etc.
      Returns:
      the type of the dependency
    • getScope

      Returns the time at which the dependency will be used. If may be, for example, at compile time only, at run time or at test time.
      Returns:
      the time at which the dependency will be used
    • getOptional

      @Nullable Boolean getOptional()
      Returns whether the dependency is optional, mandatory or of unspecified obligation.
      Returns:
      the obligation, or null if unspecified
    • getExclusions

      @Nonnull Collection<Exclusion> getExclusions()
      Returns transitive dependencies to exclude.
      Returns:
      transitive dependencies to exclude