download:wget

Full name:

com.googlecode.maven-download-plugin:download-maven-plugin:1.6.8:wget

Description:

Will download a file from a web site using the standard HTTP protocol.

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: process-resources.

Required Parameters

Name Type Since Description
<outputDirectory> File - Represent the directory where the file should be downloaded.
Default value is: ${project.build.directory}.
User property is: download.outputDirectory.
<uri> URI - Represent the URL to fetch information from.
User property is: download.url.
Alias is: url.

Optional Parameters

Name Type Since Description
<alwaysVerifyChecksum> boolean - Whether to verify the checksum of an existing file

By default, checksum verification only occurs after downloading a file. This option additionally enforces checksum verification for already existing, previously downloaded (or manually copied) files. If the checksum does not match, re-download the file.

Use this option in order to ensure that a new download attempt is made after a previously interrupted build or network connection or some other event corrupted a file.


Default value is: false.
User property is: alwaysVerifyChecksum.
<cacheDirectory> File - The directory to use as a cache. Default is ${local-repo}/.cache/maven-download-plugin
User property is: download.cache.directory.
<checkSignature> boolean - Deprecated. The option name is counter-intuitive and not related to signatures but to checksums, in fact. Please use alwaysVerifyChecksum instead. This option might be removed in a future release.
Default value is: false.
User property is: checkSignature.
<failOnError> boolean - Flag to determine whether to fail on an unsuccessful download.
Default value is: true.
<fileMappers> FileMapper[] 1.6.8 FileMappers to be used for rewriting each target path, or null if no rewriting shall happen.
User property is: download.fileMappers.
<followRedirects> boolean - Whether to follow redirects (302)
Default value is: false.
User property is: download.plugin.followRedirects.
<headers> Map - A list of additional HTTP headers to send with the request
User property is: download.plugin.headers.
<maxLockWaitTime> long - Maximum time (ms) to wait to acquire a file lock. Customize the time when using the plugin to download the same file from several submodules in parallel build.
Default value is: 30000.
User property is: maxLockWaitTime.
<md5> String - The md5 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
User property is: download.verify.md5.
<outputFileName> String - Represent the file name to use as output value. If not set, will use last segment of "url"
User property is: download.outputFileName.
<overwrite> boolean - Flag to overwrite the file by redownloading it. overwrite=true means that if the target file pre-exists at the expected target-location for the current plugin execution, then the pre-existing file will be overwritten and replaced anyway; whereas default overwrite=false will entirely skip all the execution if the target file pre-exists and matches specification (name, signatures...).
User property is: download.overwrite.
<password> String - Custom password for the download
User property is: download.auth.password.
<readTimeOut> int - Read timeout for a download in milliseconds
Default value is: 0.
<retries> int - How many retries for a download
Default value is: 2.
<runOnlyAtRoot> boolean - Runs the plugin only if the current project is the execution root. This is helpful, if the plugin is defined in a profile and should only run once to download a shared file.
Default value is: false.
User property is: runOnlyAtRoot.
<serverId> String - Server Id from settings file to use for authentication Only one of serverId or (username/password) may be supplied
User property is: download.auth.serverId.
<sha1> String - The sha1 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
User property is: download.verify.sha1.
<sha256> String - The sha256 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
User property is: download.verify.sha256.
<sha512> String - The sha512 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
User property is: download.verify.sha512.
<skip> boolean - Whether to skip execution of Mojo
Default value is: false.
User property is: download.plugin.skip.
<skipCache> boolean - Download file without polling cache. Means that the download operation will not look in the global cache to resolve the file to download, and will directly proceed with the download and won't store this download in the cache. It's recommended for urls that have "volatile" content.
Default value is: false.
User property is: download.cache.skip.
<unpack> boolean - Whether to unpack the file in case it is an archive (.zip)
Default value is: false.
User property is: download.unpack.
<username> String - Custom username for the download
User property is: download.auth.username.

Parameter Details

<alwaysVerifyChecksum>

Whether to verify the checksum of an existing file

By default, checksum verification only occurs after downloading a file. This option additionally enforces checksum verification for already existing, previously downloaded (or manually copied) files. If the checksum does not match, re-download the file.

Use this option in order to ensure that a new download attempt is made after a previously interrupted build or network connection or some other event corrupted a file.

  • Type: boolean
  • Required: No
  • User Property: alwaysVerifyChecksum
  • Default: false

<cacheDirectory>

The directory to use as a cache. Default is ${local-repo}/.cache/maven-download-plugin
  • Type: java.io.File
  • Required: No
  • User Property: download.cache.directory

<checkSignature>

Deprecated. The option name is counter-intuitive and not related to signatures but to checksums, in fact. Please use alwaysVerifyChecksum instead. This option might be removed in a future release.
(no description)
  • Type: boolean
  • Required: No
  • User Property: checkSignature
  • Default: false

<failOnError>

Flag to determine whether to fail on an unsuccessful download.
  • Type: boolean
  • Required: No
  • Default: true

<fileMappers>

FileMappers to be used for rewriting each target path, or null if no rewriting shall happen.
  • Type: org.codehaus.plexus.components.io.filemappers.FileMapper[]
  • Since: 1.6.8
  • Required: No
  • User Property: download.fileMappers

<followRedirects>

Whether to follow redirects (302)
  • Type: boolean
  • Required: No
  • User Property: download.plugin.followRedirects
  • Default: false

<headers>

A list of additional HTTP headers to send with the request
  • Type: java.util.Map
  • Required: No
  • User Property: download.plugin.headers

<maxLockWaitTime>

Maximum time (ms) to wait to acquire a file lock. Customize the time when using the plugin to download the same file from several submodules in parallel build.
  • Type: long
  • Required: No
  • User Property: maxLockWaitTime
  • Default: 30000

<md5>

The md5 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
  • Type: java.lang.String
  • Required: No
  • User Property: download.verify.md5

<outputDirectory>

Represent the directory where the file should be downloaded.
  • Type: java.io.File
  • Required: Yes
  • User Property: download.outputDirectory
  • Default: ${project.build.directory}

<outputFileName>

Represent the file name to use as output value. If not set, will use last segment of "url"
  • Type: java.lang.String
  • Required: No
  • User Property: download.outputFileName

<overwrite>

Flag to overwrite the file by redownloading it. overwrite=true means that if the target file pre-exists at the expected target-location for the current plugin execution, then the pre-existing file will be overwritten and replaced anyway; whereas default overwrite=false will entirely skip all the execution if the target file pre-exists and matches specification (name, signatures...).
  • Type: boolean
  • Required: No
  • User Property: download.overwrite

<password>

Custom password for the download
  • Type: java.lang.String
  • Required: No
  • User Property: download.auth.password

<readTimeOut>

Read timeout for a download in milliseconds
  • Type: int
  • Required: No
  • Default: 0

<retries>

How many retries for a download
  • Type: int
  • Required: No
  • Default: 2

<runOnlyAtRoot>

Runs the plugin only if the current project is the execution root. This is helpful, if the plugin is defined in a profile and should only run once to download a shared file.
  • Type: boolean
  • Required: No
  • User Property: runOnlyAtRoot
  • Default: false

<serverId>

Server Id from settings file to use for authentication Only one of serverId or (username/password) may be supplied
  • Type: java.lang.String
  • Required: No
  • User Property: download.auth.serverId

<sha1>

The sha1 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
  • Type: java.lang.String
  • Required: No
  • User Property: download.verify.sha1

<sha256>

The sha256 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
  • Type: java.lang.String
  • Required: No
  • User Property: download.verify.sha256

<sha512>

The sha512 of the file. If set, file checksum will be compared to this checksum and plugin will fail.
  • Type: java.lang.String
  • Required: No
  • User Property: download.verify.sha512

<skip>

Whether to skip execution of Mojo
  • Type: boolean
  • Required: No
  • User Property: download.plugin.skip
  • Default: false

<skipCache>

Download file without polling cache. Means that the download operation will not look in the global cache to resolve the file to download, and will directly proceed with the download and won't store this download in the cache. It's recommended for urls that have "volatile" content.
  • Type: boolean
  • Required: No
  • User Property: download.cache.skip
  • Default: false

<unpack>

Whether to unpack the file in case it is an archive (.zip)
  • Type: boolean
  • Required: No
  • User Property: download.unpack
  • Default: false

<uri>

Represent the URL to fetch information from.
  • Type: java.net.URI
  • Required: Yes
  • User Property: download.url
  • Alias: url

<username>

Custom username for the download
  • Type: java.lang.String
  • Required: No
  • User Property: download.auth.username