Full name:
com.addicticks.oss.maven:httpsupload-maven-plugin:1.1.7:multiple
Description:
Files are sent using POST method and using multipart/form-data encoding (RFC2388).
Attributes:
Name | Type | Since | Description |
---|---|---|---|
targetURL | URL | - | The URL to upload the file(s) to. Must be either HTTP or HTTPS
protocol.
The plugin derives which protocol to use from this value. Examples: https://solar.mycompany.com/upload http://pluto.vanilla.org/acceptfiles |
uploadFiles | List | - | Files to upload.
Example: <uploadFiles> <uploadFile> <file>${project.build.directory}/myfile.jar</file> </uploadFile> <uploadFile> <formFieldName>file2</formFieldName> <file>c://mydir/whatsup.dat</file> <hintFilename>whatsup.xls</hintFilename> </uploadFile> </uploadFiles> There must be at least one uploadFile element. The elements of an uploadFile are as follows:
|
Name | Type | Since | Description |
---|---|---|---|
additionalHeaders | Map | - | Sets additional overall HTTP headers to add to the upload POST
request. There's rarely a need to use this parameter.
The following header fields are automatically set: "Connection" "Cache-Control" "Content-Type" "Content-Length" "Authorization" However you might want to use this parameter to explicitly set e.g. User-Agent or non-standard header fields that are required for your particular endpoint. For example by overriding User-Agent you can make the upload operation look to the endpoint as if it comes from a browser. Example: <additionalHeaders> <!-- impersonate Safari browser on iPad --> <User-Agent>Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405</User-Agent> <!-- just an example of a really weird header field --> <From>joe@mycorp.com</From> </additionalHeaders> |
connectTimeoutMs | int | - | Connect timeout (in milliseconds) to use when connecting to the
endpoint.
If the URL is specified with a hostname as opposed to an IP address then a name lookup needs to be performed. This is not included in the connect timeout. The connect timeout is the time it takes to establish the tcp connection, nothing else. The timeout for name resolution (DNS lookup) is platform dependent. Default value is: 10000. |
extraFields | Map | - | Extra fields to send along with the file upload. The keys of the
map are the field names and the value their (String) content.
Example <extraFields> <field1>value1</field1> <field2>value2</field2> ... </extraFields> Typical use cases: Extra fields are often used to provide information about the uploader such as a name or an e-mail address. Or they can convey additional information about where the server should put the files, such as a destination folder or similar. NB: Don't set the filename field here. Posting content for filename is handled automatically. |
indicateProgress | boolean | - | Can be used to turn off upload progress logging (if parameter value
is false). By default upload progress logging is
enabled. Progress logging can be a bit 'chatty'.
Files larger than 100 MBytes will see a log entry for every one percent uploaded. For files less this size there will be proportionally less log entries. This parameter will only turn off the actual progress logging not the logging at the beginning and end of the file upload operation. Default value is: true. |
readTimeoutMs | int | - | Read timeout (in milliseconds) to use when reading from the
endpoint. This is the time from the upload has completed until the
server responds.
You may have to increase this parameter if the endpoint takes a long time to process the uploaded data. Default value is: 10000. |
useAuthentication | boolean | - | (no description) Default value is: false. |
validateCertificate | boolean | - | Specifies if the certificate at the endpoint should be validated or
not. Only relevant for HTTPS protocol, otherwise ignored.
If the value is false then the server's certificate is not validated in any way. This may be useful when working with endpoints that use a self-signed certificate. Default value is: true. |
The following header fields are automatically set:
"Connection" "Cache-Control" "Content-Type" "Content-Length" "Authorization"
However you might want to use this parameter to explicitly set e.g. User-Agent or non-standard header fields that are required for your particular endpoint. For example by overriding User-Agent you can make the upload operation look to the endpoint as if it comes from a browser.
Example:
<additionalHeaders> <!-- impersonate Safari browser on iPad --> <User-Agent>Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405</User-Agent> <!-- just an example of a really weird header field --> <From>joe@mycorp.com</From> </additionalHeaders>
If the URL is specified with a hostname as opposed to an IP address then a name lookup needs to be performed. This is not included in the connect timeout. The connect timeout is the time it takes to establish the tcp connection, nothing else. The timeout for name resolution (DNS lookup) is platform dependent.
Example
<extraFields> <field1>value1</field1> <field2>value2</field2> ... </extraFields>
Typical use cases: Extra fields are often used to provide information about the uploader such as a name or an e-mail address. Or they can convey additional information about where the server should put the files, such as a destination folder or similar.
NB: Don't set the filename field here. Posting content for filename is handled automatically.
Files larger than 100 MBytes will see a log entry for every one percent uploaded. For files less this size there will be proportionally less log entries.
This parameter will only turn off the actual progress logging not the logging at the beginning and end of the file upload operation.
You may have to increase this parameter if the endpoint takes a long time to process the uploaded data.
The plugin derives which protocol to use from this value.
Examples:
https://solar.mycompany.com/upload http://pluto.vanilla.org/acceptfiles
Example:
<uploadFiles> <uploadFile> <file>${project.build.directory}/myfile.jar</file> </uploadFile> <uploadFile> <formFieldName>file2</formFieldName> <file>c://mydir/whatsup.dat</file> <hintFilename>whatsup.xls</hintFilename> </uploadFile> </uploadFiles>
There must be at least one uploadFile element.
The elements of an uploadFile are as follows:
If the value is false then the server's certificate is not validated in any way. This may be useful when working with endpoints that use a self-signed certificate.