Class ArtifactTransfer

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.eclipse.aether.artifact.Artifact getArtifact()
      Gets the artifact being transferred.
      org.eclipse.aether.transfer.ArtifactTransferException getException()
      Gets the exception that occurred during the transfer (if any).
      java.io.File getFile()
      Deprecated.
      Use getPath() instead.
      java.nio.file.Path getPath()
      Gets the local file the artifact is downloaded to or uploaded from.
      ArtifactTransfer setArtifact​(org.eclipse.aether.artifact.Artifact artifact)
      Sets the artifact to transfer.
      ArtifactTransfer setException​(org.eclipse.aether.transfer.ArtifactTransferException exception)
      Sets the exception that occurred during the transfer.
      ArtifactTransfer setFile​(java.io.File file)
      Deprecated.
      Use setPath(Path) instead.
      ArtifactTransfer setPath​(java.nio.file.Path path)
      Sets the local file the artifact is downloaded to or uploaded from.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getArtifact

        public org.eclipse.aether.artifact.Artifact getArtifact()
        Gets the artifact being transferred.
        Returns:
        The artifact being transferred or null if not set.
      • setArtifact

        public ArtifactTransfer setArtifact​(org.eclipse.aether.artifact.Artifact artifact)
        Sets the artifact to transfer.
        Parameters:
        artifact - The artifact, may be null.
        Returns:
        This transfer for chaining, never null.
      • getFile

        @Deprecated
        public java.io.File getFile()
        Deprecated.
        Use getPath() instead.
        Gets the local file the artifact is downloaded to or uploaded from. In case of a download, a connector should first transfer the bytes to a temporary file and only overwrite the target file once the entire download is completed such that an interrupted/failed download does not corrupt the current file contents.
        Returns:
        The local file or null if not set.
      • getPath

        public java.nio.file.Path getPath()
        Gets the local file the artifact is downloaded to or uploaded from. In case of a download, a connector should first transfer the bytes to a temporary file and only overwrite the target file once the entire download is completed such that an interrupted/failed download does not corrupt the current file contents.
        Returns:
        The local file or null if not set.
        Since:
        2.0.0
      • setFile

        @Deprecated
        public ArtifactTransfer setFile​(java.io.File file)
        Deprecated.
        Use setPath(Path) instead.
        Sets the local file the artifact is downloaded to or uploaded from.
        Parameters:
        file - The local file, may be null.
        Returns:
        This transfer for chaining, never null.
      • setPath

        public ArtifactTransfer setPath​(java.nio.file.Path path)
        Sets the local file the artifact is downloaded to or uploaded from.
        Parameters:
        path - The local file, may be null.
        Returns:
        This transfer for chaining, never null.
        Since:
        2.0.0
      • getException

        public org.eclipse.aether.transfer.ArtifactTransferException getException()
        Gets the exception that occurred during the transfer (if any).
        Specified by:
        getException in class Transfer
        Returns:
        The exception or null if the transfer was successful.
      • setException

        public ArtifactTransfer setException​(org.eclipse.aether.transfer.ArtifactTransferException exception)
        Sets the exception that occurred during the transfer.
        Parameters:
        exception - The exception, may be null to denote a successful transfer.
        Returns:
        This transfer for chaining, never null.