Interface Artifact

All Known Subinterfaces:
Dependency

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

    • key

      default String key()
      Returns a unique identifier for this artifact. The identifier is composed of groupId, artifactId, version, classifier, extension.
      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: