diff --git a/src/site/markdown/examples/deploy-http.md b/src/site/markdown/examples/deploy-http.md new file mode 100644 index 0000000..a2c07d1 --- /dev/null +++ b/src/site/markdown/examples/deploy-http.md @@ -0,0 +1,70 @@ +--- +title: Deployment of artifacts with HTTP(S) +author: + - Konrad Windszus +date: 2025-09-17 +--- + + + + + + + + + + + + + + + + + + +# Deployment of artifacts with HTTP(S) + +In order to deploy artifacts using HTTP(S) you must specify the use of an HTTP(S) server in the [**distributionManagement** element of your POM](https://maven.apache.org/pom.html#Distribution_Management): + +```unknown + + ... + + + my-mrm-relases + http://localhost:8081/nexus/content/repositories/release + + + ... + +``` + +## Authentication + +Your `settings.xml` would contain a `server` element where the `id` of that element matches `id` of the HTTP(S) repository specified in the POM above. It must contain the credentials to be used (in [encrypted form](https://maven.apache.org/guides/mini/guide-encryption.html)): + +```unknown + + ... + + + my-mrm-releases + + + + + ... + +``` + +Further details in [Security and Deployment Settings](https://maven.apache.org/guides/mini/guide-deployment-security-settings.html). + +## HTTP method + +Deployment leverages one *HTTP PUT* request per artifact/checksum/metadata (optionally using HTTP Basic Authentication) with no query parameters. Make sure your used [Maven repository manager](https://maven.apache.org/repository-management.html) supports this method of deployment, otherwise this plugin cannot be used. + +*[Sonatype Central Portal](https://maven.apache.org/repository/guide-central-repository-upload.html) only supports this via the legacy [Portal OSSRH Staging API](https://central.sonatype.org/publish/publish-portal-ossrh-staging-api/) for release versions. [SNAPSHOT version](https://central.sonatype.org/publish/publish-portal-snapshots/) deployments for Central Portal are still supported with `maven-deploy-plugin`*. + +## HTTP client settings + +The HTTP client being used by default depends on the underlying Maven version as the [Maven Resolver Transport](https://maven.apache.org/guides/mini/guide-resolver-transport.html) is leveraged for the actual deployment. One can override that default client with Maven user property `maven.resolver.transport`. Maven Resolver also evaluates other advanced [configuration properties](https://maven.apache.org/resolver-archives/resolver-LATEST-1.x/configuration.html) which can be set as Maven user properties. However, in most of the cases the defaults should work fine. diff --git a/src/site/markdown/project-deployment.md b/src/site/markdown/project-deployment.md index b9860cb..2a4fb80 100644 --- a/src/site/markdown/project-deployment.md +++ b/src/site/markdown/project-deployment.md @@ -26,6 +26,7 @@ date: 2006-07-14 Here are examples of using the deploy plugin for project deployment: +- [Deployment with HTTP(S)](./examples/deploy-http.html) - [Deployment with FTP](./examples/deploy-ftp.html) - [Deployment with external SSH](./examples/deploy-ssh-external.html) - [Workarounds when there are network issues](./examples/deploy-network-issues.html) diff --git a/src/site/site.xml b/src/site/site.xml index 42f093a..6cde213 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -41,6 +41,7 @@ under the License. +