Interface Artifact

All Known Subinterfaces:
Dependency
All Known Implementing Classes:
DefaultArtifact, DefaultDependency

@Experimental @Immutable public interface Artifact
An artifact points to a resource such as a jar file or war application.
Since:
4.0.0
  • Method Details

    • key

      default String key()
      Returns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, extension, classifier, and version.
      Returns:
      the unique identifier
    • getGroupId

      @Nonnull String getGroupId()
      The groupId of the artifact.
      Returns:
      the groupId
    • getArtifactId

      @Nonnull String getArtifactId()
      The artifactId of the artifact.
      Returns:
      the artifactId
    • getVersion

      @Nonnull Version getVersion()
      The version of the artifact.
      Returns:
      the version
    • getClassifier

      @Nonnull String getClassifier()
      The classifier of the artifact.
      Returns:
      the classifier or an empty string if none, never null
    • getExtension

      @Nonnull String getExtension()
      The file extension of the artifact.
      Returns:
      the extension
    • isSnapshot

      boolean isSnapshot()
      Determines whether this artifact uses a snapshot version.
      Returns:
      true if the artifact is a snapshot, false otherwise
      See Also:
    • toCoordinate

      Shortcut for session.createArtifactCoordinate(artifact)
      Returns:
      an ArtifactCoordinate
      See Also: