deploy:deploy-file

Full name:

org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file

Description:

Installs the artifact in the remote repository.

Attributes:

  • The goal is thread-safe and supports parallel builds.

Required Parameters

Name Type Since Description
<file> File - File to be deployed.
User property is: file.
<repositoryId> String - Server Id to map on the <id> under <server> section of settings.xml In most cases, this parameter will be required for authentication.
Default value is: remote-repository.
User property is: repositoryId.
<url> String - URL where the artifact will be deployed.
ie ( file:///C:/m2-repo or scp://host.com/path/to/repo )
User property is: url.

Optional Parameters

Name Type Since Description
<artifactId> String - ArtifactId of the artifact to be deployed. Retrieved from POM file if specified.
User property is: artifactId.
<classifier> String - Add classifier to the artifact
User property is: classifier.
<classifiers> String - A comma separated list of classifiers for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in files or types, then an error will be raised.
User property is: classifiers.
<description> String - Description passed to a generated POM file (in case of generatePom=true)
User property is: generatePom.description.
<files> String - A comma separated list of files for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in types or classifiers, then an error will be raised.
User property is: files.
<generatePom> boolean - Upload a POM for this artifact. Will generate a default POM if none is supplied with the pomFile argument.
Default value is: true.
User property is: generatePom.
<groupId> String - GroupId of the artifact to be deployed. Retrieved from POM file if specified.
User property is: groupId.
<javadoc> File 2.6 The bundled API docs for the artifact.
User property is: javadoc.
<packaging> String - Type of the artifact to be deployed. Retrieved from the <packaging> element of the POM file if a POM file specified. Defaults to the file extension if it is not specified via command line or POM.
Maven uses two terms to refer to this datum: the <packaging> element for the entire POM, and the <type> element in a dependency specification.
User property is: packaging.
<pomFile> File - Location of an existing POM file to be deployed alongside the main artifact, given by the ${file} parameter.
User property is: pomFile.
<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.
Default value is: 1.
User property is: retryFailedDeploymentCount.
<skip> String 3.1.0 Set this to 'true' to bypass artifact deploy It's not a real boolean as it can have more than 2 values:
  • true: will skip as usual
  • releases: will skip if current version of the project is a release
  • snapshots: will skip if current version of the project is a snapshot
  • any other values will be considered as false

Default value is: false.
User property is: maven.deploy.file.skip.
<sources> File 2.6 The bundled sources for the artifact.
User property is: sources.
<types> String - A comma separated list of types for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in files or classifiers, then an error will be raised.
User property is: types.
<version> String - Version of the artifact to be deployed. Retrieved from POM file if specified.
User property is: version.

Parameter Details

<artifactId>

ArtifactId of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Required: No
  • User Property: artifactId

<classifier>

Add classifier to the artifact
  • Type: java.lang.String
  • Required: No
  • User Property: classifier

<classifiers>

A comma separated list of classifiers for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in files or types, then an error will be raised.
  • Type: java.lang.String
  • Required: No
  • User Property: classifiers

<description>

Description passed to a generated POM file (in case of generatePom=true)
  • Type: java.lang.String
  • Required: No
  • User Property: generatePom.description

<file>

File to be deployed.
  • Type: java.io.File
  • Required: Yes
  • User Property: file

<files>

A comma separated list of files for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in types or classifiers, then an error will be raised.
  • Type: java.lang.String
  • Required: No
  • User Property: files

<generatePom>

Upload a POM for this artifact. Will generate a default POM if none is supplied with the pomFile argument.
  • Type: boolean
  • Required: No
  • User Property: generatePom
  • Default: true

<groupId>

GroupId of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Required: No
  • User Property: groupId

<javadoc>

The bundled API docs for the artifact.
  • Type: java.io.File
  • Since: 2.6
  • Required: No
  • User Property: javadoc

<packaging>

Type of the artifact to be deployed. Retrieved from the <packaging> element of the POM file if a POM file specified. Defaults to the file extension if it is not specified via command line or POM.
Maven uses two terms to refer to this datum: the <packaging> element for the entire POM, and the <type> element in a dependency specification.
  • Type: java.lang.String
  • Required: No
  • User Property: packaging

<pomFile>

Location of an existing POM file to be deployed alongside the main artifact, given by the ${file} parameter.
  • Type: java.io.File
  • Required: No
  • User Property: pomFile

<repositoryId>

Server Id to map on the <id> under <server> section of settings.xml In most cases, this parameter will be required for authentication.
  • Type: java.lang.String
  • Required: Yes
  • User Property: repositoryId
  • Default: remote-repository

<retryFailedDeploymentCount>

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.
  • Type: int
  • Since: 2.7
  • Required: No
  • User Property: retryFailedDeploymentCount
  • Default: 1

<skip>

Set this to 'true' to bypass artifact deploy It's not a real boolean as it can have more than 2 values:
  • true: will skip as usual
  • releases: will skip if current version of the project is a release
  • snapshots: will skip if current version of the project is a snapshot
  • any other values will be considered as false
  • Type: java.lang.String
  • Since: 3.1.0
  • Required: No
  • User Property: maven.deploy.file.skip
  • Default: false

<sources>

The bundled sources for the artifact.
  • Type: java.io.File
  • Since: 2.6
  • Required: No
  • User Property: sources

<types>

A comma separated list of types for each of the extra side artifacts to deploy. If there is a mis-match in the number of entries in files or classifiers, then an error will be raised.
  • Type: java.lang.String
  • Required: No
  • User Property: types

<url>

URL where the artifact will be deployed.
ie ( file:///C:/m2-repo or scp://host.com/path/to/repo )
  • Type: java.lang.String
  • Required: Yes
  • User Property: url

<version>

Version of the artifact to be deployed. Retrieved from POM file if specified.
  • Type: java.lang.String
  • Required: No
  • User Property: version