Checksum
JReleaser calculates checksums for all input files and artifacts. These checksums are grouped into a single file named
checksums_<algorithm>.txt which in turn may be signed and uploaded to a release.
Use the following options to customize how checksums are handled:
Supported algorithms:
-
MD2 -
MD5 -
RMD160 -
SHA-1 -
SHA-256 -
SHA-384 -
SHA-512 -
SHA3-224 -
SHA3-256 -
SHA3-384 -
SHA3-512
Configuration
Legend:
-
required
-
optional
-
may use environment variable
-
accepts Name Templates
#
checksum:
# The name of the grouping checksums file.
# Defaults to `checksums.txt`.
#
name: '{{projectName}}-{{projectVersion}}_checksums.txt'
# Algorithm to be used.
# Supported values are [`MD2`, `MD5`, `RMD160`, `SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
# Default value is `SHA-256`.
# `SHA-256` is always configured.
#
algorithms:
- MD5
- SHA-256
# Uploads individual checksum files.
# Defaults to `false`.
#
individual: true
# Whether to checksum artifacts in the `distributions` section or not.
# Defaults to `true`.
#
artifacts: true
# Whether to checksum files in the `files` section or not.
# Defaults to `true`.
#
files: true
#
[checksum]
# The name of the grouping checksums file.
# Defaults to `checksums.txt`.
#
name = "{{projectName}}-{{projectVersion}}_checksums.txt"
# Algorithm to be used.
# Supported values are [`MD2`, `MD5`, `RMD160`, `SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
# Default value is `SHA-256`.
# `SHA-256` is always configured.
#
algorithms = ["MD5", "SHA-256"]
# Uploads individual checksum files.
# Defaults to `false`.
#
individual = true
# Whether to checksum artifacts in the `distributions` section or not.
# Defaults to `true`.
#
artifacts = true
# Whether to checksum files in the `files` section or not.
# Defaults to `true`.
#
files = true
{
//
"checksum": {
// The name of the grouping checksums file.
// Defaults to `checksums.txt`.
//
"name": "{{projectName}}-{{projectVersion}}_checksums.txt",
// Algorithm to be used.
// Supported values are [`MD2`, `MD5`, `RMD160`, `SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
// Default value is `SHA-256`.
// `SHA-256` is always configured.
//
"algorithms": [
"MD5",
"SHA-256"
],
// Uploads individual checksum files.
// Defaults to `false`.
//
"individual": true,
// Whether to checksum artifacts in the `distributions` section or not.
// Defaults to `true`.
//
"artifacts": true,
// Whether to checksum files in the `files` section or not.
// Defaults to `true`.
//
"files": true
}
}
<jreleaser>
<!--
-->
<checksum>
<!--
The name of the grouping checksums file.
Defaults to `checksums.txt`.
-->
<name>{{projectName}}-{{projectVersion}}_checksums.txt</name>
<!--
Algorithm to be used.
Supported values are [`MD2`, `MD5`, `RMD160`, `SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
Default value is `SHA-256`.
`SHA-256` is always configured.
-->
<algorithms>
<algorithm>MD5</algorithm>
<algorithm>SHA-256</algorithm>
</algorithms>
<!--
Uploads individual checksum files.
Defaults to `false`.
-->
<individual>true</individual>
<!--
Whether to checksum artifacts in the `distributions` section or not.
Defaults to `true`.
-->
<artifacts>true</artifacts>
<!--
Whether to checksum files in the `files` section or not.
Defaults to `true`.
-->
<files>true</files>
</checksum>
</jreleaser>
jreleaser {
//
checksum {
// The name of the grouping checksums file.
// Defaults to `checksums.txt`.
//
name = '{{projectName}}-{{projectVersion}}_checksums.txt'
// Algorithm to be used.
// Supported values are [`MD2`, `MD5`, `RMD160`, `SHA-1`, `SHA-256`, `SHA-384`, `SHA-512`, `SHA3-224`, `SHA3-256`, `SHA3-384`, `SHA3-512`].
// Default value is `SHA-256`.
// `SHA-256` is always configured.
//
algorithm('MD5')
algorithm('SHA-256')
// Uploads individual checksum files.
// Defaults to `false`.
//
individual = true
// Whether to checksum artifacts in the `distributions` section or not.
// Defaults to `true`.
//
artifacts = true
// Whether to checksum files in the `files` section or not.
// Defaults to `true`.
//
files = true
}
}
Extra Properties
Both Distributions and Artifacts may define an extra property named
"individualChecksum". If the value is set to true then the checksums for the given element will also be added to the
release files.
The precedence rules are:
-
If the Artifact has a property "individualChecksum":
-
if the property resolves to
truethen the individual checksum is released. -
if the property resolves to
falsethen the individual checksum is skipped and no more rules are checked.
-
-
If the Distribution has a property "individualChecksum":
-
if the property resolves to
truethen individual checksums for all its artifacts are released. -
if the property resolves to
falsethen all of its individual checksums are skipped and no more rules are checked.
-
-
If the
checksum.individualproperty is set:-
if the property resolves to
truethen individual checksums are released. -
if the property resolves to
falsethen no individual checksums are released.
-
Skip Checksum
Artifacts and globs in the Files section may define an extra property will prevent checksum
calculation. The name of this property must match skipChecksum and be set to true.