deploy:deploy
Full name:
org.apache.maven.plugins:maven-deploy-plugin:4.0.0-beta-3:deploy
Description:
Deploys an artifact to remote repository.
Attributes:
- Requires a Maven project to be executed.
- The goal is not marked as thread-safe and thus does not support parallel builds.
- Binds by default to the lifecycle phase:
deploy.
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<allowIncompleteProjects> |
boolean |
3.1.1 |
Set this to true to allow incomplete project processing. By default, such projects are forbidden and Mojo will fail to process them. Incomplete project is a Maven Project that has any other packaging than "pom" and has no main artifact packaged. In the majority of cases, what user really wants here is a project with "pom" packaging and some classified artifact attached (typical example is some assembly being packaged and attached with classifier). |
<altDeploymentRepository> |
String |
- |
Specifies an alternative repository to which the project artifacts should be deployed (other than those specified in <distributionManagement>).
Format: id::url
id::layout::url where layout could be default (ie. Maven 2) or legacy (ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.
Security note: the credentials looked up in Policy note: unlike a repository declared in |
<altReleaseDeploymentRepository> |
String |
2.8 |
The alternative repository to use when the project has a final version. Note: In version 2.x, the format was id::layout::url where layout could be default (ie. Maven 2) or legacy (ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.See also: altDeploymentRepository |
<altSnapshotDeploymentRepository> |
String |
2.8 |
The alternative repository to use when the project has a snapshot version. Note: In version 2.x, the format was id::layout::url where layout could be default (ie. Maven 2) or legacy (ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.See also: altDeploymentRepository |
<deployAtEnd> |
boolean |
2.8 |
Whether every project should be deployed during its own deploy-phase or at the end of the multimodule build. When set to true, the deploy requests of all projects with a bound deploy execution are collected and executed together once the last such project has reached its deploy phase, which reduces the chance of publishing artifacts from a build that subsequently fails.
This is not an atomic, all-or-nothing guarantee. In particular:
|
<retryFailedDeploymentCount> |
int |
2.7 |
Parameter used to control how many times a failed deployment will be retried before giving up and failing. If a value outside the range 1-10 is specified it will be pulled to the nearest value within the range 1-10. |
<skip> |
String |
2.4 |
Set this to 'true' to bypass artifact deploy Since 3.0.0-M2 it's not anymore a real boolean as it can have more than 2 values:
|
Parameter Details
<allowIncompleteProjects>
true to allow incomplete project processing. By default, such projects are forbidden and Mojo will fail to process them. Incomplete project is a Maven Project that has any other packaging than "pom" and has no main artifact packaged. In the majority of cases, what user really wants here is a project with "pom" packaging and some classified artifact attached (typical example is some assembly being packaged and attached with classifier).- Type:
boolean - Since:
3.1.1 - Required:
No
<altDeploymentRepository>
Format:
id::url
- id
- The id can be used to pick up the correct credentials from the settings.xml
- url
- The location of the repository
id::layout::url where layout could be default (ie. Maven 2) or legacy (ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.
Security note: the credentials looked up in settings.xml are selected purely by the id part, so this parameter can point credentials kept for one server at a different URL. The provenance of the value matters: when the id matches a settings.xml server entry (stored credentials) and no URL is on record for that id in this build, a value set from the POM (a pom property or plugin configuration) is refused, while a value supplied on the command line (-DaltDeploymentRepository=...) proceeds with a warning naming the URL the credentials will be sent to. When the id matches a settings.xml server entry and the URL differs from every URL this build associates with that id, the deployment is refused unless -Dmaven.deploy.allowCredentialReuse=true is given on the command line.
Policy note: unlike a repository declared in distributionManagement, an alternative repository is built from just id::url and therefore carries API-default release/snapshot policies and serves both artifact kinds; release/snapshot acceptance is enforced by the server only.
- Type:
java.lang.String - Required:
No
<altReleaseDeploymentRepository>
id::layout::url where layout could be default (ie. Maven 2) or legacy (ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.See also: altDeploymentRepository
- Type:
java.lang.String - Since:
2.8 - Required:
No
<altSnapshotDeploymentRepository>
id::layout::url where layout could be default (ie. Maven 2) or legacy (ie. Maven 1), but since 3.0.0 the layout part has been removed because Maven 3 only supports Maven 2 repository layout.See also: altDeploymentRepository
- Type:
java.lang.String - Since:
2.8 - Required:
No
<deployAtEnd>
true, the deploy requests of all projects with a bound deploy execution are collected and executed together once the last such project has reached its deploy phase, which reduces the chance of publishing artifacts from a build that subsequently fails.
This is not an atomic, all-or-nothing guarantee. In particular:
- The batch fires when the last project with a deploy execution reaches its deploy phase. Reactor projects built after that point (for example trailing modules that skip or do not bind the deploy goal, such as integration-test aggregators) can still fail after all artifacts have been published.
- When the batch spans several repositories or retry configurations, the resulting requests are deployed sequentially: a failure part-way through leaves the repositories already deployed to published, with no rollback. The build log reports which repositories had already been deployed when this happens.
- Projects configured with
deployAtEnd=falsedeploy immediately during their own deploy phase and cannot be recalled by a later build failure.
- Type:
boolean - Since:
2.8 - Required:
No
<retryFailedDeploymentCount>
- Type:
int - Since:
2.7 - Required:
No
<skip>
true: will skip as usualreleases: will skip if current version of the project is a releasesnapshots: will skip if current version of the project is a snapshot- values are matched case-insensitively; any other value fails the build (fail-closed: a typo in a publish-suppression control must not silently publish)
- Type:
java.lang.String - Since:
2.4 - Required:
No
