Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions src/site/markdown/examples/deploy-http.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Deployment of artifacts with HTTP(S)
author:
- Konrad Windszus
date: 2025-09-17
---

<!-- Licensed to the Apache Software Foundation (ASF) under one-->
<!-- or more contributor license agreements. See the NOTICE file-->
<!-- distributed with this work for additional information-->
<!-- regarding copyright ownership. The ASF licenses this file-->
<!-- to you under the Apache License, Version 2.0 (the-->
<!-- "License"); you may not use this file except in compliance-->
<!-- with the License. You may obtain a copy of the License at-->
<!---->
<!-- http://www.apache.org/licenses/LICENSE-2.0-->
<!---->
<!-- Unless required by applicable law or agreed to in writing,-->
<!-- software distributed under the License is distributed on an-->
<!-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY-->
<!-- KIND, either express or implied. See the License for the-->
<!-- specific language governing permissions and limitations-->
<!-- under the License.-->

# 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
<project>
...
<distributionManagement>
<repository>
<id>my-mrm-relases</id>
<url>http://localhost:8081/nexus/content/repositories/release</url>
</repository>
</distributionManagement>
...
</project>
```

## 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
<settings>
...
<servers>
<server>
<id>my-mrm-releases</id>
<username><my-encrypted-user></username>
<password><my-encrypted-password></password>
</server>
</servers>
...
</settings>
```

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.
1 change: 1 addition & 0 deletions src/site/markdown/project-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
1 change: 1 addition & 0 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ under the License.
</menu>
<menu name="Examples">
<item name="Project Deployment" collapse="true" href="project-deployment.html">
<item name="Deployment with HTTP(S)" href="examples/deploy-http.html" />
<item name="Deployment with FTP" href="examples/deploy-ftp.html" />
<item name="Deployment with external SSH" href="examples/deploy-ssh-external.html"/>
<item name="Deploying With Network Issues" href="examples/deploy-network-issues.html"/>
Expand Down
Loading