Document latest changes

This commit is contained in:
Andres Almiray
2021-05-09 19:24:56 +02:00
parent 8ad0a5fbcf
commit 017f05984e
3 changed files with 28 additions and 8 deletions

View File

@@ -24,6 +24,8 @@ This property is *optional*.
* `platform`. Defines the OS specific platform for this file. Some xref:configuration:assemble/index.adoc[assemblers] * `platform`. Defines the OS specific platform for this file. Some xref:configuration:assemble/index.adoc[assemblers]
and xref:configuration:packagers/index.adoc[packagers] require that artifacts define a platform. and xref:configuration:packagers/index.adoc[packagers] require that artifacts define a platform.
* `extraPproperties`. Defines key/value pairs of metadata that's related to the artifact.
include::configuration:partial$platform.adoc[] include::configuration:partial$platform.adoc[]
Globs have the following properties: Globs have the following properties:

View File

@@ -554,6 +554,9 @@ Additional names become available when the artifact defines a `platform`
| artifact{{CapitalizedPlatform}}Name | the name of the artifact file without extension | artifact{{CapitalizedPlatform}}Name | the name of the artifact file without extension
|=== |===
Additionally, every key/value from `artifact.extraProperties` is mapped with `artifact` as key prefix for the first
artifact, and `artifact{{CapitalizedPlatform}}` for all artifacts, and the capitalized key.
Thus, for artifacts defined as Thus, for artifacts defined as
[tabs] [tabs]
@@ -567,6 +570,8 @@ distributions:
app: app:
artifacts: artifacts:
- path: path/to/{{distributionName}}-{{projectVersion}}.zip - path: path/to/{{distributionName}}-{{projectVersion}}.zip
extraProperties:
main: true
- path: path/to/{{distributionName}}-{{projectVersion}}-mac.zip - path: path/to/{{distributionName}}-{{projectVersion}}-mac.zip
platform: osx platform: osx
---- ----
@@ -575,11 +580,13 @@ TOML::
[source,toml] [source,toml]
[subs="+macros"] [subs="+macros"]
---- ----
[distributions.app] pass:[[[distributions.app.artifact]]]
artifact = [ path: "path/to/{{distributionName}}-{{projectVersion}}.zip"
{ path = "path/to/{{distributionName}}-{{projectVersion}}.zip" }, extraProperties.main = true
{ path = "path/to/{{distributionName}}-{{projectVersion}}-mac.zip", platform = "osx" }
] pass:[[[distributions.app.artifact]]]
path = "path/to/{{distributionName}}-{{projectVersion}}-mac.zip"
platform = "osx"
---- ----
JSON:: JSON::
+ +
@@ -591,7 +598,11 @@ JSON::
"app": { "app": {
"artifacts": [ "artifacts": [
{ {
"path": "path/to/{{distributionName}}-{{projectVersion}}.zip" "path": "path/to/{{distributionName}}-{{projectVersion}}.zip",
"extraProperties":
{
"main": true
}
}, },
{ {
"path": "path/to/{{distributionName}}-{{projectVersion}}-mac.zip", "path": "path/to/{{distributionName}}-{{projectVersion}}-mac.zip",
@@ -613,6 +624,9 @@ Maven::
<artifacts> <artifacts>
<artifact> <artifact>
<path>path/to/${project.artifactId}-${project.version}.zip</path> <path>path/to/${project.artifactId}-${project.version}.zip</path>
<extraProperties>
<main>true</main>
</extraProperties>
</artifact> </artifact>
<artifact> <artifact>
<path>path/to/${project.artifactId}-${project.version}-mac.zip</path> <path>path/to/${project.artifactId}-${project.version}-mac.zip</path>
@@ -634,6 +648,7 @@ jreleaser {
artifacts { artifacts {
artifact { artifact {
path = "path/to/${project.name}-${project.version}.zip" path = "path/to/${project.name}-${project.version}.zip"
extraProperties.put("main", true)
} }
artifact { artifact {
path = "path/to/${project.name}-${project.version}-mac.zip" path = "path/to/${project.name}-${project.version}-mac.zip"
@@ -654,6 +669,7 @@ The following names will be calculated:
* artifactSha256 * artifactSha256
* artifactFileName: `${project.name}-${project.version}.zip` * artifactFileName: `${project.name}-${project.version}.zip`
* artifactName: `${project.name}-${project.version}` * artifactName: `${project.name}-${project.version}`
* artifactMain: true
* distributionUrl * distributionUrl
* distributionSha256 * distributionSha256
* distributionArtifactFileName: `${project.name}-${project.version}.zip` * distributionArtifactFileName: `${project.name}-${project.version}.zip`

View File

@@ -2,7 +2,7 @@ The value of `platform` is dictated by the normalized values detected by
link:https://github.com/trustin/os-maven-plugin[os-maven-plugin]. You may use the plain `platform` value or append a link:https://github.com/trustin/os-maven-plugin[os-maven-plugin]. You may use the plain `platform` value or append a
`arch` classifier. The following values are currently recognized: `arch` classifier. The following values are currently recognized:
platform:: `aix`, `hpux`, `os400`, `linux`, `osx`, `freebsd`, `openbsd`, `netbsd`, `sunos`, `windows`, `zos`. platform:: `aix`, `hpux`, `os400`, `linux`, `linux_musl`, `osx`, `freebsd`, `openbsd`, `netbsd`, `sunos`, `windows`, `zos`.
arch:: `x86_64`, `x86_32`, `itanium_64`, `itanium_32`, `sparc_32`, `sparc_64`, `arm_32`, `aarch_64`, `mips_32`, arch:: `x86_64`, `x86_32`, `itanium_64`, `itanium_32`, `sparc_32`, `sparc_64`, `arm_32`, `aarch_64`, `mips_32`,
`mipsel_32`, `mips_64`, `mipsel_64`, `ppc_32`, `ppcle_32`, `ppc_64`, `ppcle_64`, `s390_32`, `s390_64`, `riscv` `mipsel_32`, `mips_64`, `mipsel_64`, `ppc_32`, `ppcle_32`, `ppc_64`, `ppcle_64`, `s390_32`, `s390_64`, `riscv`
@@ -12,4 +12,6 @@ Examples:
* `osx-arm` * `osx-arm`
* `windows` * `windows`
* `linux` * `linux`
* `linux-x86_64` * `linux-x8w6_64`
TIP: Use `linux_musl` for artifacts that target Alpine Linux.