Ftp
Downloads artifacts, files, and signatures from a FTP server.
Configuration
Legend:
-
required
-
optional
-
may use environment variable
-
accepts Name Templates
#
download:
#
ftp:
# Downloaders require a name.
#
app:
# Enables or disables the downloader.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
# Defaults to `NEVER`.
#
active: ALWAYS
# Defines the connection timeout in seconds.
# Defaults to `20`.
#
connectTimeout: 20
# Defines the read timeout in seconds.
# Defaults to `60`.
#
readTimeout: 60
# Additional properties used when evaluating templates.
#
extraProperties:
# Key will be capitalized and prefixed with `ftp`, i.e, `ftpFoo`.
foo: bar
# Host where the FTP service is enabled.
#
host: downloads.acme.com
# Port number of FTP service.
# Defaults to `21`.
#
port: 21
# The username required for authorization.
#
username: __USE_ENVIRONMENT_VARIABLE__
# Password for login into the FTP service.
#
password: __USE_ENVIRONMENT_VARIABLE__
# A list of assets to be downloaded.
#
assets:
# Full download path to asset.
#
- input: '/logos/logo-256x256.png'
# Local path where asset will be downloaded to.
# Defaults to `#{jreleaser.downloadDirectory}/#{downloader.name}`.
#
output: '{{projectName}}.png'
# Unpack options
#
unpack:
# Unpack input archive when `true`.
# Defaults to `false`.
#
enabled: false
# Skip the archive's root entry from the unpacked directory when `true`.
# Defaults to `false`.
#
skipRootEntry: false
# Downloaders require a name.
#
[download.ftp.app]
# Enables or disables the downloader.
# Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
# Defaults to `NEVER`.
#
active = "ALWAYS"
# Defines the connection timeout in seconds.
# Defaults to `20`.
#
connectTimeout = 20
# Defines the read timeout in seconds.
# Defaults to `60`.
#
readTimeout = 60
# Additional properties used when evaluating templates.
#
extraProperties.foo = "bar"
# Key will be capitalized and prefixed with `ftp`, i.e, `ftpFoo`.
# Host where the FTP service is enabled.
#
host = "downloads.acme.com"
# Port number of FTP service.
# Defaults to `port`.
#
port = 21
# The username required for authorization.
#
username = "__USE_ENVIRONMENT_VARIABLE__"
# Password for login into the FTP service.
#
password = "__USE_ENVIRONMENT_VARIABLE__"
# A list of assets to be downloaded.
#
[[dowload.ftp.app.assets]]
# Full download path to asset.
#
input = "/logos/logo-256x256.png"
# Local path where asset will be downloaded to.
# Defaults to `#{jreleaser.downloadDirectory}/#{downloader.name}`.
#
output = "{{projectName}}.png"
# Unpack input archive when `true`.
# Defaults to `false`.
#
unpack.enabled: false
# Skip the archive's root entry from the unpacked directory when `true`.
# Defaults to `false`.
#
unpack.skipRootEntry: false
{
//
"download": {
//
"ftp": {
// Downloaders require a name.
//
"app": {
// Enables or disables the downloader.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `NEVER`.
//
"active": "ALWAYS",
// Defines the connection timeout in seconds.
// Defaults to `20`.
//
"connectTimeout": 20,
// Defines the read timeout in seconds.
// Defaults to `60`.
//
"readTimeout": 60,
// Additional properties used when evaluating templates.
//
"extraProperties": {
// Key will be capitalized and prefixed with `ftp`, i.e, `ftpFoo`.
"foo": "bar"
},
// Host where the FTP service is enabled.
// If left unspecified, the `JRELEASER_FTP_${name}_HOST`
// environment variable must be defined.
//
"host": "downloads.acme.com",
// Port number of FTP service.
// If left unspecified, the `JRELEASER_FTP_${name}_PORT`
// environment variable must be defined.
// Defaults to `21`.
//
"port": 21,
// The username required for authorization.
// If left unspecified, the `JRELEASER_FTP_${name}_USERNAME`
// environment variable must be defined.
//
"username": "__USE_ENVIRONMENT_VARIABLE__",
// Password for login into the FTP service.
// If left unspecified, the `JRELEASER_FTP_${name}_PASSWORD`
// environment variable must be defined.
//
"password": "__USE_ENVIRONMENT_VARIABLE__",
// A list of assets to be downloaded.
//
"assets": [
{
// Full download path to asset.
//
"input": "/logos/logo-256x256.png",
// Local path where asset will be downloaded to.
// Defaults to `#{jreleaser.downloadDirectory}/#{downloader.name}`.
//
"output": "{{projectName}}.png",
// Unpack options
//
"unpack": {
// Unpack input archive when `true`.
// Defaults to `false`.
//
"enabled": false,
// Skip the archive's root entry from the unpacked directory when `true`.
// Defaults to `false`.
//
"skipRootEntry": false
}
}
]
}
}
}
}
<jreleaser>
<!--
-->
<download>
<!--
-->
<ftp>
<!--
Downloaders require a name.
-->
<app>
<!--
Enables or disables the distribution.
Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
Defaults to `NEVER`.
-->
<active>ALWAYS</active>
<!--
Defines the connection timeout in seconds.
Defaults to `20`.
-->
<connectTimeout>20</connectTimeout>
<!--
Defines the read timeout in seconds.
Defaults to `60`.
-->
<readTimeout>60</readTimeout>
<!--
Additional properties used when evaluating templates.
-->
<extraProperties>
<!--
Key will be capitalized and prefixed with `ftp`, i.e, `ftpFoo`.
-->
<foo>bar</foo>
</extraProperties>
<!--
Host where the FTP service is enabled.
-->
<host>downloads.acme.com</host>
<!--
Port number of FTP service.
Defaults to `21`.
-->
<port>21</port>
<!--
The username required for authorization.
-->
<username>__USE_ENVIRONMENT_VARIABLE__</username>
<!--
Password for login into the FTP service.
-->
<password>__USE_ENVIRONMENT_VARIABLE__</password>
<!--
A list of assets to be downloaded.
-->
<assets>
<asset>
<!--
Full download path to asset.
-->
<input>/logos/logo-256x256.png</input>
<!--
Local path where asset will be downloaded to.
Defaults to `#{jreleaser.downloadDirectory}/#{downloader.name}`.
-->
<output>{{projectName}}.png</output>
<!--
Unpack options
-->
<unpack>
<!--
Unpack input archive when `true`.
Defaults to `false`.
-->
<enabled>false</enabled>
<!--
Skip the archive's root entry from the unpacked directory when `true`.
Defaults to `false`.
-->
<skipRootEntry>false</skipRootEntry>
</unpack>
</asset>
</assets>
</app>
</ftp>
</download>
</jreleaser>
jreleaser {
//
download {
//
ftp {
// Downloaders require a name.
//
app {
// Enables or disables the downloader.
// Supported values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
// Defaults to `NEVER`.
//
active = 'ALWAYS'
// Defines the connection timeout in seconds.
// Defaults to `20`.
//
connectTimeout = 20
// Defines the read timeout in seconds.
// Defaults to `60`.
//
readTimeout = 60
// Additional properties used when evaluating templates.
// Key will be capitalized and prefixed with `ftp`, i.e, `ftpFoo`.
//
extraProperties.put('foo', 'bar')
// Host where the FTP service is enabled.
//
host = 'downloads.acme.com'
// Port number of FTP service.
// Defaults to `21`.
//
port = 21
// The username required for authorization.
//
username = '__USE_ENVIRONMENT_VARIABLE__'
// Password for login into the FTP service.
//
password = '__USE_ENVIRONMENT_VARIABLE__'
// A list of assets to be downloaded.
//
asset {
// Full download path to asset.
//
input = '/logos/logo-256x256.png'
// Local path where asset will be downloaded to.
// Defaults to `#{jreleaser.downloadDirectory}/#{downloader.name}`.
//
output = '{{projectName}}.png'
// Unpack options
//
unpack {
// Unpack input archive when `true`.
// Defaults to `false`.
//
enabled = false
// Skip the archive's root entry from the unpacked directory when `true`.
// Defaults to `false`.
//
skipRootEntry = false
}
}
}
}
}
}
Environment
When not explicitly set, the value of the following properties may be resolved from an environment variable or a system property as shown in the table. The system property takes precedence over the environment variable.
System Property | Environment Variable |
---|---|
active |
|
jreleaser.download.ftp.${name}.active |
JRELEASER_DOWNLOAD_FTP_${name}_ACTIVE |
host |
|
jreleaser.download.ftp.${name}.host |
JRELEASER_DOWNLOAD_FTP_${name}_HOST |
port |
|
jreleaser.download.ftp.${name}.port |
JRELEASER_DOWNLOAD_FTP_${name}_PORT |
username |
|
jreleaser.download.ftp.${name}.username |
JRELEASER_DOWNLOAD_FTP_${name}_USERNAME |
password |
|
jreleaser.download.ftp.${name}.password |
JRELEASER_DOWNLOAD_FTP_${name}_PASSWORD |
Substitute ${name} for the value of the named instance. |
Space (' '), underscore (_
), and dash (-
) will be replaced by dot (.
) to separate tokens in the System property.
Space (' '), dash (-
), and dot (.
) will be replaced by underscore (_
) to separate tokens in the environment variable,
such that:
${name} | System Property | Environment Variable |
---|---|---|
foobar |
|
|
fooBar |
|
|
foo bar |
|
|
foo-bar |
|
|
foo_bar |
|
|
foo.bar |
|
|