Deployment
Deploying artifacts and related metadata to a (remote) repository can be achieved via Resolver API with method org.eclipse.aether.RepositorySystem.deploy(RepositorySystemSession session, DeployRequest request)
. This writes/uploads the given artifact(s) including metadata to the given repository leveraging a RepositoryConnector
.
The most prominent consumer of this API is probably maven-deploy-plugin.
Repository Connector
The default repository connector implementation at BasicRepositoryConnectorFactory
uses a RepositoryLayout
to calculate the URL and a Transporter
to achieve the actual upload/write of artifacts/metadata.
Repository Layout
The repository layout determines the location to which the artifact is being written/uploaded with its RepositoryLayout.getLocation(Artifact, true)
or RepositoryLayout.getLocation(Metadata, true)
method. For Maven 2 repositories the logic is implemented in Maven2RepositoryLayoutFactory
.
Transporter
All transporter implementations have a put(...)
method which is called during deployment. The repository's URL protocol determines which method is used for the deployment. The standard transporters implement put(...)
like follows:
URL Protocol | Implementation | Description |
---|---|---|
file , bundle |
org.eclipse.aether.transport.file.FileTransporter |
Writes artifact/metadata to the file system. |
http , https |
multiple | Issues a HTTP PUT request for each given artifact/metadata. |
classpath |
org.eclipse.aether.transport.classpath.ClasspathTransporter |
Unsupported |
minio+http , minio+https , s3+http , s3+https |
org.eclipse.aether.transport.minio.MinioTransporter |
Uploads artifact/metadata as object to bucket. The location returned from the RepositoryLayout is being converted to an object and bucket name according to the configuration. |
* |
org.eclipse.aether.transport.wagon.WagonTransporter |
Calls StreamingWagon.putFromStream(...) or Wagon.put(...) . See Apache Wagon for further details. |