Package org.eclipse.aether.spi.connector
Class ArtifactUpload
- java.lang.Object
-
- org.eclipse.aether.spi.connector.Transfer
-
- org.eclipse.aether.spi.connector.ArtifactTransfer
-
- org.eclipse.aether.spi.connector.ArtifactUpload
-
public final class ArtifactUpload extends ArtifactTransfer
An upload of an artifact to a remote repository. A repository connector processing this upload has to usesetException(ArtifactTransferException)to report the results of the transfer.
-
-
Constructor Summary
Constructors Constructor Description ArtifactUpload()Creates a new uninitialized upload.ArtifactUpload(org.eclipse.aether.artifact.Artifact artifact, java.io.File file)Deprecated.UseArtifactUpload(Artifact, Path)instead.ArtifactUpload(org.eclipse.aether.artifact.Artifact artifact, java.nio.file.Path path)Creates a new upload with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ArtifactUploadsetArtifact(org.eclipse.aether.artifact.Artifact artifact)Sets the artifact to transfer.ArtifactUploadsetException(org.eclipse.aether.transfer.ArtifactTransferException exception)Sets the exception that occurred during the transfer.ArtifactUploadsetFile(java.io.File file)Deprecated.ArtifactUploadsetListener(org.eclipse.aether.transfer.TransferListener listener)ArtifactUploadsetPath(java.nio.file.Path path)Sets the local file the artifact is downloaded to or uploaded from.ArtifactUploadsetTrace(org.eclipse.aether.RequestTrace trace)java.lang.StringtoString()-
Methods inherited from class org.eclipse.aether.spi.connector.ArtifactTransfer
getArtifact, getException, getFile, getPath
-
Methods inherited from class org.eclipse.aether.spi.connector.Transfer
getListener, getTrace
-
-
-
-
Constructor Detail
-
ArtifactUpload
public ArtifactUpload()
Creates a new uninitialized upload.
-
ArtifactUpload
@Deprecated public ArtifactUpload(org.eclipse.aether.artifact.Artifact artifact, java.io.File file)
Deprecated.UseArtifactUpload(Artifact, Path)instead.Creates a new upload with the specified properties.- Parameters:
artifact- The artifact to upload, may benull.file- The local file to upload the artifact from, may benull.
-
ArtifactUpload
public ArtifactUpload(org.eclipse.aether.artifact.Artifact artifact, java.nio.file.Path path)
Creates a new upload with the specified properties.- Parameters:
artifact- The artifact to upload, may benull.path- The local file to upload the artifact from, may benull.- Since:
- 2.0.0
-
-
Method Detail
-
setArtifact
public ArtifactUpload setArtifact(org.eclipse.aether.artifact.Artifact artifact)
Description copied from class:ArtifactTransferSets the artifact to transfer.- Overrides:
setArtifactin classArtifactTransfer- Parameters:
artifact- The artifact, may benull.- Returns:
- This transfer for chaining, never
null.
-
setFile
@Deprecated public ArtifactUpload setFile(java.io.File file)
Deprecated.Description copied from class:ArtifactTransferSets the local file the artifact is downloaded to or uploaded from.- Overrides:
setFilein classArtifactTransfer- Parameters:
file- The local file, may benull.- Returns:
- This transfer for chaining, never
null.
-
setPath
public ArtifactUpload setPath(java.nio.file.Path path)
Description copied from class:ArtifactTransferSets the local file the artifact is downloaded to or uploaded from.- Overrides:
setPathin classArtifactTransfer- Parameters:
path- The local file, may benull.- Returns:
- This transfer for chaining, never
null.
-
setException
public ArtifactUpload setException(org.eclipse.aether.transfer.ArtifactTransferException exception)
Description copied from class:ArtifactTransferSets the exception that occurred during the transfer.- Overrides:
setExceptionin classArtifactTransfer- Parameters:
exception- The exception, may benullto denote a successful transfer.- Returns:
- This transfer for chaining, never
null.
-
setListener
public ArtifactUpload setListener(org.eclipse.aether.transfer.TransferListener listener)
-
setTrace
public ArtifactUpload setTrace(org.eclipse.aether.RequestTrace trace)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-