Document latest changes

This commit is contained in:
Andres Almiray
2021-04-22 19:38:29 +02:00
parent 0c7f153a25
commit ef2d6fd277
47 changed files with 589 additions and 112 deletions

View File

@@ -13,6 +13,7 @@ nav:
- modules/quick-start/nav.adoc
- modules/ROOT/nav-workflow.adoc
- modules/ROOT/nav-distributions.adoc
- modules/ROOT/nav-artifacts.adoc
- modules/configuration/nav.adoc
- modules/templates/nav.adoc
- modules/continuous-integration/nav.adoc

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 KiB

View File

@@ -0,0 +1 @@
* xref:artifacts.adoc[]

View File

@@ -0,0 +1,246 @@
= Artifacts
Artifacts are at the heart of a release; they define files that may be:
* added to a Git xref:configuration:release/index.adoc[release].
* prepared, packaged, and uploaded using a xref:configuration:packagers/index.adoc[packager].
== Properties
Artifacts have the following properties:
* `path`. Defines the location of the file. Path may be relative or absolute. We recomend defining paths
that are relative to the `basedir` as much as possible, as that simplifies the setup on
xref:continuous-integration:index.adoc[CI]. Its value may use xref:configuration:name-templates.adoc[].
This property is *required*.
* `transform`. Sometimes the source path does not have the exact name you'd looking for. You may apply a
name transformation using this property. Its value may use xref:configuration:name-templates.adoc[].
This property is *optional*.
* `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.
include::configuration:partial$platform.adoc[]
== Examples
*Platform*
Generating cross-platform JLink images require that each target JDK define a value for its corresponding platform.
Target JDKs are of type `artifact`.
[tabs]
====
YAML::
+
[source,yaml]
[subs="+macros"]
----
assemble:
jlinks:
app:
active: always
jdk:
path: '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
platform: osx
targetJdks:
- path: '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
platform: osx
- path: '{{oracleJdks}}/jdk-16_linux-x64'
platform: linux
- path: '{{oracleJdks}}/jdk-16_windows-x64'
platform: windows
mainJar:
path: 'target/{{distributionName}}-{{projectVersion}}.jar'
----
TOML::
+
[source,toml]
[subs="+macros"]
----
[assemble.jlinks.app]
active = "ALWAYS"
mainJar = { path = "target/{{distributionName}}-{{projectVersion}}.jar" }
jdk = { path = "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home", platform = "osx" }
pass:[[[assemble.jlinks.app.targetJdks]]]
path = "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home"
platform = "osx"
pass:[[[assemble.jlinks.app.targetJdks]]]
path = "{{oracleJdks}}/jdk-16_linux-x64"
platform = "linux"
pass:[[[assemble.jlinks.app.targetJdks]]]
path = "{{oracleJdks}}/jdk-16_windows-x64"
platform = "windows"
----
JSON::
+
[source,json]
[subs="+macros"]
----
{
"assemble": {
"jlinks": {
"app": {
"active": "ALWAYS",
"mainJar": {
"path": "target/{{distributionName}}-{{projectVersion}}.jar"
},
"jdk": {
"path": "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home",
"platform": "osx"
},
"targetJdks": [
{
"path": "{{oracleJdks}}/jdk-16_osx-x64/Contents/Home",
"platform": "osx"
},
{
"path": "{{oracleJdks}}/jdk-16_linux-x64",
"platform": "linux"
},
{
"path": "{{oracleJdks}}/jdk-16_windows-x64",
"platform": "windows"
}
]
}
}
},
}
----
Maven::
+
[source,xml]
[subs="+macros,verbatim,attributes"]
----
<jreleaser>
<assemble>
<jlinks>
<jlink>
<name>app</name>
<active>ALWAYS</active>
<mainJar>
<path>target/{{distributionName}}-{{projectVersion}}.jar</path>
</mainJar>
<jdk>
<path>{{oracleJdks}}/jdk-16_osx-x64/Contents/Home</path>
<platform>osx</platform>
</jdk>
<targetJdks>
<targetJdk>
<path>{{oracleJdks}}/jdk-16_osx-x64/Contents/Home</path>
<platform>osx</platform>
</targetJdk>
<targetJdk>
<path>{{oracleJdks}}/jdk-16_linux-x64</path>
<platform>linux</platform>
</targetJdk>
<targetJdk>
<path>{{oracleJdks}}/jdk-16_windows-x64</path>
<platform>windows</platform>
</targetJdk>
</targetJdks>
</jlink>
</jlinks>
</assemble>
</jreleaser>
----
Gradle::
+
[source,groovy]
[subs="+macros"]
----
jreleaser {
assemble {
jlinks {
app {
active = 'ALWAYS'
mainJar {
path = 'target/{{distributionName}}-{{projectVersion}}.jar'
}
jdk {
path = '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
platform = 'osx'
}
targetJdk {
path = '{{oracleJdks}}/jdk-16_osx-x64/Contents/Home'
platform = 'osx'
}
targetJdk {
path = '{{oracleJdks}}/jdk-16_linux-x64'
platform = 'linux'
}
targetJdk {
path = '{{oracleJdks}}/jdk-16_windows-x64'
platform = 'windows'
}
}
}
}
}
----
====
*Transform*
JReleaser itself uses the `transform` property to rename its artifacts depending on the type of release.
[source,yaml]
.jreleaser.yml
----
distributions:
jreleaser:
artifacts:
- path: apps/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
jreleaser-ant-tasks:
artifacts:
- path: plugins/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
jreleaser-tool-provider:
type: SINGLE_JAR
artifacts:
- path: apps/jreleaser-tool-provider/build/libs/jreleaser-tool-provider-{{projectVersion}}.jar
transform: 'jreleaser-tool-provider/jreleaser-tool-provider-{{projectEffectiveVersion}}.jar'
----
Artifacts point to these files when the project version is snapshot:
[source,sh]
----
out
└── jreleaser
└── artifacts
├── jreleaser
│ └── jreleaser-early-access.zip
├── jreleaser-ant-tasks
│ └── jreleaser-ant-tasks-early-access.zip
└── jreleaser-tool-provider
└── jreleaser-tool-provider-early-access.jar
----
Whereas the following files will be used when the project is release:
[source,sh]
[subs="attributes"]
----
.
├── apps
│ ├── jreleaser
│ │ └── build
│ │ └── distributions
│ │ └── jreleaser-{jreleaser-version}.zip
│ └── jreleaser-tool-provider
│ └── build
│ └── libs
│ └── jreleaser-tool-provider-{jreleaser-version}.jar
└── plugins
└── jreleaser-ant-tasks
└── build
└── distributions
└── jreleaser-ant-tasks-{jreleaser-version}.zip
----

View File

@@ -44,7 +44,7 @@ applications. Generates distribution files that follow the expected structure. A
* link:https://badass-jlink-plugin.beryx.org/releases/latest/[badass-jlink-plugin] plugin: use it for *modular*
applications. Generates distribution files that follow the expected structure. Also, packages the distribution as a Zip.
You may also configure a xref:configuration:assemble/jlink.adoc[] assembler.
Alternatively, you may also configure a xref:configuration:assemble/jlink.adoc[] assembler.
== Packager Support

View File

@@ -12,7 +12,7 @@ Gradle plugins that can create such binaries.
* link:https://www.graalvm.org/reference-manual/native-image/NativeImageMavenPlugin/[native-image-maven-plugin].
You may also configure a xref:configuration:assemble/native-image.adoc[] assembler.
Alternatively, you may also configure a xref:configuration:assemble/native-image.adoc[] assembler.
== Packager Support

View File

@@ -3,7 +3,7 @@
Distributions of this type are comprised of a single, executable JAR, with all their dependencies available inside
the JAR. These JARs are also known as `fatjar` or `uber-jar`.
Single JAR distributions *require* a suitable Java runtime to be installed on the consumer side.
Single JAR distributions *require* a suitable Java runtime to be *already installed* on the consumer side.
== Creating a Distribution
@@ -15,7 +15,7 @@ We recommend using the following plugins to create suitable Single JAR distribut
an uber-jar.
* link:https://maven.apache.org/plugins/maven-jar-plugin/[maven-jar-plugin]: if the JAR has no additional dependencies.
Make sure to make the JAR executable by setting the `Main-Class` manifest entry.
Make sure the JAR is executable by setting the `Main-Class` manifest entry.
.Gradle
@@ -23,7 +23,7 @@ Make sure to make the JAR executable by setting the `Main-Class` manifest entry.
an uber-jar.
* link:https://docs.gradle.org/current/userguide/java_plugin.html[java]: if the JAR has no additional dependencies.
Make sure to make the JAR executable by setting the `Main-Class` manifest entry.
Make sure the JAR is executable by setting the `Main-Class` manifest entry.
== Packager Support

View File

@@ -3,7 +3,7 @@
JReleaser is a release automation tool for Java projects. Its goal is to simplify creating releases and publishing artifacts
to multiple package managers while providing customizable options.
== What it Does
== What it does
JReleaser takes inputs from popular builds tools (Ant, Maven, Gradle) such as JAR files, binary distributions
(`.zip`, `.tar`), JLink images, or any other file that you'd like to publish as a Git release on popular Git services
@@ -13,8 +13,10 @@ as Twitter, Zulip, SDKMAN!, and others.
image::jreleaser-tools.png[]
== How does it work
A release process can be customized with a `jreleaser.[yml|toml|json]` file if using the xref:tools:cli.adoc[CLI] or
xref:tools:ant.adoc[ANT] options, or direct DSL configuration inside a `pom.xml` (xref:tools:maven.adoc[Maven]) or
xref:tools:ant.adoc[Ant] options, or direct DSL configuration inside a `pom.xml` (xref:tools:maven.adoc[Maven]) or
`build.gradle` (xref:tools:gradle.adoc[Gradle]) file.
Once setup, you can create a new release by invoking the `full-release` command.
@@ -24,5 +26,6 @@ provided as templates.
== Acknowledgments
JReleaser is heavily inspired by link:https://goreleaser.com[GoReleaser].
JReleaser is heavily inspired by link:https://goreleaser.com[GoReleaser], it also builds on top of the lessons learned
from link:github.com/jbangdev/jbang[jbang]'s build setup.

View File

@@ -18,9 +18,16 @@ sdk install jreleaser
*jbang*
[source]
.stable
----
// Download, cache, and run
jbang jreleaser@jreleaser <args>
jbang jreleaser@jreleaser <command> [<args>]
----
[source]
.early-access
----
// Download, cache, and run
jbang jreleaser_snapshot@jreleaser <command> [<args>]
----
*manually*
@@ -39,9 +46,16 @@ sdk install jreleaser
*jbang*
[source]
.stable
----
// Download, cache, and run
jbang jreleaser@jreleaser <args>
jbang jreleaser@jreleaser <command> [<args>]
----
[source]
.early-access
----
// Download, cache, and run
jbang jreleaser_snapshot@jreleaser <command> [<args>]
----
*manually*
@@ -66,9 +80,16 @@ sdk install jreleaser
*jbang*
[source]
.stable
----
// Download, cache, and run
jbang jreleaser@jreleaser <args>
jbang jreleaser@jreleaser <command> [<args>]
----
[source]
.early-access
----
// Download, cache, and run
jbang jreleaser_snapshot@jreleaser <command> [<args>]
----
*manually*
@@ -78,6 +99,20 @@ uncompress and copy to the desired location.
--
====
== Docker
You can run JReleaser as a docker image, skipping the need to have a pre-installed Java runtime. You must mount the
working directory at the `/workspace` volume, for example assuming the current directory is the starting point:
[source]
----
$ docker run -it --rm -v `(pwd)`:/workspace jreleaser/jreleaser-slim:<tag> <command> [<args>]
----
NOTE: The `--basedir` argument will be automatically set to `--basedir=/workspace`.
You may also need to map environment variables to the container, such as `JRELEASER_PROJECT_VERSION`,
`JRELEASER_GITHUB_TOKEN`, or others depending on your setup. Refer to the xref:configuration:index.adoc[] pages.
== Maven
Configure the xref:tools:maven.adoc[jreleaser-maven-plugin] in your POM file

View File

@@ -1,31 +1,31 @@
.Configuration
* xref:environment.adoc[]
* xref:project.adoc[]
* xref:signing.adoc[]
* xref:release/index.adoc[]
** xref:release/github.adoc[]
** xref:release/gitlab.adoc[]
** xref:release/gitea.adoc[]
* xref:assemble/index.adoc[]
** xref:assemble/jlink.adoc[]
** xref:assemble/native-image.adoc[]
* xref:packagers/index.adoc[]
** xref:packagers/chocolatey.adoc[]
** xref:packagers/docker.adoc[]
** xref:packagers/homebrew.adoc[]
** xref:packagers/jbang.adoc[]
** xref:packagers/scoop.adoc[]
** xref:packagers/snap.adoc[]
* xref:distributions.adoc[]
* xref:files.adoc[]
* xref:announce/index.adoc[]
** xref:announce/discord.adoc[]
** xref:announce/discussions.adoc[]
** xref:announce/gitter.adoc[]
** xref:announce/mail.adoc[]
** xref:announce/sdkman.adoc[]
** xref:announce/slack.adoc[]
** xref:announce/teams.adoc[]
** xref:announce/twitter.adoc[]
** xref:announce/zulip.adoc[]
* xref:name-templates.adoc[]
* xref:index.adoc[]
** xref:environment.adoc[]
** xref:project.adoc[]
** xref:signing.adoc[]
** xref:release/index.adoc[]
*** xref:release/github.adoc[]
*** xref:release/gitlab.adoc[]
*** xref:release/gitea.adoc[]
** xref:assemble/index.adoc[]
*** xref:assemble/jlink.adoc[]
*** xref:assemble/native-image.adoc[]
** xref:packagers/index.adoc[]
*** xref:packagers/chocolatey.adoc[]
*** xref:packagers/docker.adoc[]
*** xref:packagers/homebrew.adoc[]
*** xref:packagers/jbang.adoc[]
*** xref:packagers/scoop.adoc[]
*** xref:packagers/snap.adoc[]
** xref:distributions.adoc[]
** xref:files.adoc[]
** xref:announce/index.adoc[]
*** xref:announce/discord.adoc[]
*** xref:announce/discussions.adoc[]
*** xref:announce/gitter.adoc[]
*** xref:announce/mail.adoc[]
*** xref:announce/sdkman.adoc[]
*** xref:announce/slack.adoc[]
*** xref:announce/teams.adoc[]
*** xref:announce/twitter.adoc[]
*** xref:announce/zulip.adoc[]
** xref:name-templates.adoc[]

View File

@@ -254,4 +254,4 @@ jreleaser {
You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -285,4 +285,4 @@ jreleaser {
You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -253,4 +253,4 @@ jreleaser {
You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -525,7 +525,7 @@ NOTE: At least one of `to`, `cc`, or `bcc` must be specified.
You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.
The following mail properties will be set by default given these conditions:

View File

@@ -9,9 +9,9 @@ scopes set:
1. Log into the target Slack workspace.
2. Create a link:https://api.slack.com/apps/new[Slack app].
4. Click on Incoming Webhooks.
5. Create a new webhook.
6. Copy the generated webhook URL.
3. Click on Incoming Webhooks.
4. Create a new webhook.
5. Copy the generated webhook URL.
IMPORTANT: Webhooks are not protected, anyone with access to the webhook URI can send messages to the target room. Prefer
setting the `JRELEASER_SLACK_WEBHOOK` environment variable over explicitly setting a value in the configuration DSL.
@@ -316,4 +316,4 @@ jreleaser {
You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -228,4 +228,4 @@ jreleaser {
The message must follow the link:https://docs.microsoft.com/en-us/outlook/actionable-messages/adaptive-card[Adaptive Card]
format.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -308,5 +308,5 @@ jreleaser {
----
====
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -343,4 +343,4 @@ jreleaser {
You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.
The template file may be initialized using the template command.
The template file may be initialized using the `template` command.

View File

@@ -20,7 +20,7 @@ YAML::
# icon:dot-circle[]
assemble:
# icon:dot-circle[]
jlink:
jlinks:
# Assemblers require a name.
# icon:exclamation-triangle[]
app:
@@ -157,7 +157,7 @@ TOML::
----
# Assemblers require a name.
# icon:exclamation-triangle[]
[assemble.jlink.app]
[assemble.jlinks.app]
# Enables or disables the assembler.
# Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
@@ -283,7 +283,7 @@ JSON::
// icon:dot-circle[]
"assemble": {
// icon:dot-circle[]
"jlink": {
"jlinks": {
// Assemblers require a name.
// icon:exclamation-triangle[]
"app": {
@@ -442,7 +442,7 @@ Maven::
<!--
icon:dot-circle[]
-->
<jlink>
<jlinks>
<!--
Assemblers require a name.
icon:exclamation-triangle[]
@@ -646,7 +646,7 @@ Maven::
</extraProperties>
</java>
</app>
</jlink>
</jlinks>
</assemble>
</jreleaser>
----
@@ -659,7 +659,7 @@ jreleaser {
// icon:dot-circle[]
assemble {
// icon:dot-circle[]
jlink {
jlinks {
// Assemblers require a name.
// icon:exclamation-triangle[]
app {

View File

@@ -17,7 +17,7 @@ YAML::
# icon:dot-circle[]
assemble:
# icon:dot-circle[]
nativeImage:
nativeImages:
# Assemblers require a name.
# icon:exclamation-triangle[]
app:
@@ -124,7 +124,7 @@ TOML::
----
# Assemblers require a name.
# icon:exclamation-triangle[]
[assemble.nativeImage.app]
[assemble.nativeImages.app]
# Enables or disables the assembler.
# Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
@@ -223,7 +223,7 @@ JSON::
// icon:dot-circle[]
"assemble": {
// icon:dot-circle[]
"nativeImage": {
"nativeImages": {
// Assemblers require a name.
// icon:exclamation-triangle[]
"app": {
@@ -346,7 +346,7 @@ Maven::
<!--
icon:dot-circle[]
-->
<nativeImage>
<nativeImages>
<!--
Assemblers require a name.
icon:exclamation-triangle[]
@@ -506,7 +506,7 @@ Maven::
</extraProperties>
</java>
</app>
</nativeImage>
</nativeImages>
</assemble>
</jreleaser>
----
@@ -519,7 +519,7 @@ jreleaser {
// icon:dot-circle[]
assemble {
// icon:dot-circle[]
nativeImage {
nativeImages {
// Assemblers require a name.
// icon:exclamation-triangle[]
app {

View File

@@ -494,20 +494,6 @@ jreleaser {
It's recommended to list universal artifacts first, then platform specific.
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
`arch` classifier. The following values are currently recognized:
platform:: `aix`, `hpux`, `os400`, `linux`, `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`,
`mipsel_32`, `mips_64`, `mipsel_64`, `ppc_32`, `ppcle_32`, `ppc_64`, `ppcle_64`, `s390_32`, `s390_64`, `riscv`
Examples:
* `osx`
* `osx-arm`
* `windows`
* `linux`
* `linux-x86_64`
include::partial$platform.adoc[]

View File

@@ -1,6 +1,8 @@
= Configuration
This section describes elements that can be configured in `jrelease.yml` file. This file can be generated by running
`jreleaser init --format yml` or start from scratch. Other configuration formats besides YAML may be supported as well,
such as JSON, the xref:tools:maven.adoc[Maven] DSL, the xref:tools:gradle.adoc[Gradle] DSL.
`jreleaser init --format yml` or start from scratch.
Other configuration formats besides YAML may be supported as well, such as TOML, JSON,
the xref:tools:maven.adoc[Maven] DSL, the xref:tools:gradle.adoc[Gradle] DSL.

View File

@@ -95,6 +95,7 @@ The following names are related to xref:configuration:project.adoc[]
| projectName | the project name
| projectNameCapitalized | the project name, capitalized, hyphens replaced by spaces.
| projectVersion | the project version
| projectEffectiveVersion | the project effective version
| projectVersionMajor | the major number of the project's version
| projectVersionMinor | the minor number (if any) of the project's version
| projectVersionPatch | the patch number (if any) of the project's version
@@ -119,6 +120,11 @@ The following names are related to xref:configuration:project.adoc[]
| projectMainClass | the main class launched by the executable script launcher
|===
The value of `projectEffectiveVersion` is calculated as follows:
* if the project is snapshot the value becomes "`early-access`". `projectVersion` remains unchanged.
* if the project is release the value is the same as `projectVersion`.
Additionally, every key/value from `project.extraProperties` is mapped with `project` as key prefix and the capitalized
key, such that
@@ -296,6 +302,11 @@ The following names are related to xref:configuration:release/index.adoc[]
| reverseRepoHost | reversed Git host, i.e. "com.github"
|===
The value of `tagName` is calculated as follows:
* if the project is snapshot the value becomes "`early-access`".
* if the project is release the value remains unchanged.
== Distribution
The following names are related to xref:configuration:distributions.adoc[]

View File

@@ -441,7 +441,7 @@ jreleaser {
----
====
Template files may be initialized using the template command.
Template files may be initialized using the `template` command.
NOTE: The bucket token environment variable must match with the chosen xref:release/index.adoc[] service, that is, it must
be one of [`JRELEASER_CHOCOLATEY_GITHUB_TOKEN`, `JRELEASER_CHOCOLATEY_GITLAB_TOKEN`, `JRELEASER_CHOCOLATEY_GITEA_TOKEN`].

View File

@@ -525,7 +525,7 @@ jreleaser {
----
====
Template files may be initialized using the template command.
Template files may be initialized using the `template` command.
Assuming that the current version is `1.2.3`, and a distribution named `app`, the above configuration will generate
a Dockerfile like the following one:
@@ -656,6 +656,15 @@ This will build the following images:
* `myuser/app`
== Prerelease Image Names
A different set of images names will be automatically configured when the project is snapshot, to avoid possible clashes
with production images.
JReleaer will look for the first image name that ends with `:{{tagName}}` and discard the rest.
It will use `{{repoOwner}}/{{distributionName}}:{{tagName}}` if no matching image name is found.
== Keeping docker images updated for current major
Some users might want to when version to push docker tags `:v1`, `:v1.6`, `:v1.6.4` and `:latest` when `v1.6.4`

View File

@@ -532,7 +532,7 @@ jreleaser {
----
====
Template files may be initialized using the template command.
Template files may be initialized using the `template` command.
NOTE: The tap token environment variable must match with the chosen xref:release/index.adoc[] service, that is, it must
be one of [`JRELEASER_HOMEBREW_GITHUB_TOKEN`, `JRELEASER_HOMEBREW_GITLAB_TOKEN`, `JRELEASER_HOMEBREW_GITEA_TOKEN`].

View File

@@ -4,7 +4,7 @@ After a release is created at the desired remote Git host, JReleaser can generat
into their respective distribution media, such a Git repository you have access to, or a packager store.
The sections defined here can be applied globally (for all distributions) or per distribution. Global configuration is
inherited by distribution configuration. Here's for example how xref:packagers/homebrew.adoc[] and xref:packagers/scoop.adoc[]
inherited by distributions. Here's for example how xref:packagers/homebrew.adoc[] and xref:packagers/scoop.adoc[]
can be activated for all distributions:
[tabs]

View File

@@ -413,7 +413,7 @@ jreleaser {
----
====
Template files may be initialized using the template command.
Template files may be initialized using the `template` command.
NOTE: The catalog token environment variable must match with the chosen xref:release/index.adoc[] service, that is, it must
be one of [`JRELEASER_JBANG_GITHUB_TOKEN`, `JRELEASER_JBANG_GITLAB_TOKEN`, `JRELEASER_JBANG_GITEA_TOKEN`].

View File

@@ -439,7 +439,7 @@ jreleaser {
----
====
Template files may be initialized using the template command.
Template files may be initialized using the `template` command.
NOTE: The bucket token environment variable must match with the chosen xref:release/index.adoc[] service, that is, it must
be one of [`JRELEASER_SCOOP_GITHUB_TOKEN`, `JRELEASER_SCOOP_GITLAB_TOKEN`, `JRELEASER_SCOOP_GITEA_TOKEN`].

View File

@@ -823,7 +823,7 @@ jreleaser {
----
====
Template files may be initialized using the template command.
Template files may be initialized using the `template` command.
NOTE: The snap token environment variable must match with the chosen xref:release/index.adoc[] service, that is, it must
be one of [`JRELEASER_SNAP_GITHUB_TOKEN`, `JRELEASER_SNAP_GITLAB_TOKEN`, `JRELEASER_SNAP_GITEA_TOKEN`].

View File

@@ -0,0 +1,15 @@
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
`arch` classifier. The following values are currently recognized:
platform:: `aix`, `hpux`, `os400`, `linux`, `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`,
`mipsel_32`, `mips_64`, `mipsel_64`, `ppc_32`, `ppcle_32`, `ppc_64`, `ppcle_64`, `s390_32`, `s390_64`, `riscv`
Examples:
* `osx`
* `osx-arm`
* `windows`
* `linux`
* `linux-x86_64`

View File

@@ -1,6 +1,6 @@
.Continuous Integration
* xref:github-actions.adoc[]
* xref:jenkins.adoc[]
* xref:circle-ci.adoc[]
* xref:codefresh.adoc[]
* xref:gitlab-ci.adoc[]
* xref:index.adoc[]
** xref:github-actions.adoc[]
** xref:jenkins.adoc[]
** xref:circle-ci.adoc[]
** xref:codefresh.adoc[]
** xref:gitlab-ci.adoc[]

View File

@@ -0,0 +1,10 @@
= Continuous Integration
JReleaser can be run as part of a CI pipeline. The following options are currently available, with more to come
in the future:
* xref:github-actions.adoc[]
* xref:jenkins.adoc[]
* xref:circle-ci.adoc[]
* xref:codefresh.adoc[]
* xref:gitlab-ci.adoc[]

View File

@@ -1,4 +1,5 @@
.Examples
* xref:jreleaser.adoc[]
* xref:simple-release.adoc[]
* xref:auto-config-release.adoc[]
* xref:cross-platform-jlink.adoc[]

View File

@@ -74,5 +74,9 @@ The following environment variables must be provided:
* `JRELEASER_GPG_PUBLIC_KEY`
* `JRELEASER_GPG_SECRET_KEY`
If the signing flags are omitted then only the following environment variable must be provided:
* `JRELEASER_GITHUB_TOKEN`
Find more information about the options available for this type of releases
xref:tools:cli.adoc#_release[here].

View File

@@ -237,7 +237,7 @@ Maven::
<path>/home/jdks/16.0.0-zulu-osx</path>
<platform>osx</platform>
</targetJdk>
<targetJdk> {
<targetJdk>
<path>/home/jdks/16.0.0-zulu-linux</path>
<platform>linux</platform>
</targetJdk>

View File

@@ -0,0 +1,108 @@
= JReleaser's Release
It should be no surprise that JReleaser relies on itself to create its releases.
The following link:https://raw.githubusercontent.com/jreleaser/jreleaser/main/jreleaser.yml[configuration file]
is used to create both release and snapshot releases:
[source,yaml]
[subs="verbatim"]
.jreleaser.yml
----
# General information about this project
project:
name: jreleaser
description: Release Java projects quickly and easily with JReleaser
longDescription: Release Java projects quickly and easily with JReleaser
website: https://jreleaser.org
authors:
- Andres Almiray
license: Apache-2.0
java:
groupId: org.jreleaser
version: 8
# The repository is hosted at https://github.com/jreleaser/jreleaser
# which means the default username would be `jreleaser` however a
# different username is required
release:
github:
username: aalmiray
overwrite: true
sign: true
# File signing is always active
signing:
active: always
armored: true
# Announcing a release only occurs whn it's not snapshot
announce:
twitter:
active: release
sdkman:
active: release
# Configure 3 distributions
distributions:
# Distribution 1 is of type JAVA_BINARY
jreleaser:
java:
mainClass: org.jreleaser.cli.Main
brew:
# Active only on release
active: release
scoop:
# Active only on release
active: release
jbang:
# Always active
active: always
artifacts:
# Transform the artifact name
- path: apps/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
# Distribution 2 is of type JAVA_BINARY
jreleaser-ant-tasks:
extraProperties:
# Do not considerits artifacts for publication via SdkMan
sdkmanSkip: true
artifacts:
# Transform the artifact name
- path: plugins/{{distributionName}}/build/distributions/{{distributionName}}-{{projectVersion}}.zip
transform: '{{distributionName}}/{{distributionName}}-{{projectEffectiveVersion}}.zip'
# Distribution 2 is of type SINGLE_JAR
jreleaser-tool-provider:
type: SINGLE_JAR
executable: jreleaser
java:
# A different Java version is required to run this distribution
version: 11
docker:
# Always active
active: always
imageNames:
- '{{repoOwner}}/{{projectName}}-slim:{{tagName}}'
- '{{repoOwner}}/{{projectName}}-slim:latest'
postCommands:
- 'VOLUME /workspace'
registries:
# Will publish to hub.docker.com
- serverName: DEFAULT
username: jreleaser
artifacts:
# Transform the artifact name
- path: apps/jreleaser-tool-provider/build/libs/jreleaser-tool-provider-{{projectVersion}}.jar
transform: 'jreleaser-tool-provider/jreleaser-tool-provider-{{projectEffectiveVersion}}.jar'
files:
artifacts:
- path: VERSION
----
Which will create and tag a prerelease on GitHub when the project is snapshot
image::ROOT:jreleaser-early-access.png[]

View File

@@ -1,5 +1,5 @@
.Quick Start
* xref:cli.adoc[]
* xref:maven.adoc[]
* xref:gradle.adoc[]
* xref:ant.adoc[]
* xref:index.adoc[]
** xref:cli.adoc[]
** xref:maven.adoc[]
** xref:gradle.adoc[]
** xref:ant.adoc[]

View File

@@ -1,4 +1,4 @@
= Quick Start - Ant
= Apache Ant
Your Ant build must be configured to create binary distributions (Zips and Tars). Review the
link:http://ant.apache.org/[Ant] documentation to find out how to do that. Follow the instructions

View File

@@ -1,4 +1,4 @@
= Quick Start - CLI
= Command Line
Once JReleaser is installed you may initialize its config file by invoking the following command:

View File

@@ -1,4 +1,4 @@
= Quick Start - Gradle
= Gradle
Your project should be able to produce binary distributions, a feat typically achieved by configuring
the `link:https://docs.gradle.org/current/userguide/application_plugin.html[application]` plugin.

View File

@@ -0,0 +1,8 @@
= Quick Start
The following sections describe how to get started with different tool integrations:
* xref:cli.adoc[]
* xref:maven.adoc[]
* xref:gradle.adoc[]
* xref:ant.adoc[]

View File

@@ -1,4 +1,4 @@
= Quick Start - Maven
= Apache Maven
Your project should be able to compile, package, and assemble a distribution. We recommend configuring the
following Maven plugins:

View File

@@ -17,7 +17,8 @@ for a particular packager. You may override this behavior by providing your own
expected by each packager, or by pointing the packager to a different template source.
Template files may be generated using the appropriate command exposed by your tool of choice:
xref:tools:cli.adoc[CLI], xref:tools:maven.adoc[Maven], xref:tools:gradle.adoc[Gradle], xref:tools:ant.adoc[Ant].
xref:tools:cli.adoc#_template[CLI], xref:tools:maven.adoc#_jreleasertemplate[Maven],
xref:tools:gradle.adoc#_jreleasertemplate[Gradle], xref:tools:ant.adoc#_jreleaser_template[Ant].
Some configuration elements let you define custom properties that may be used as placeholders, for example

View File

@@ -1,6 +1,7 @@
.Tools
* xref:cli.adoc[]
* xref:maven.adoc[]
* xref:gradle.adoc[]
* xref:ant.adoc[]
* xref:tool-provider.adoc[]
* xref:index.adoc[]
** xref:cli.adoc[]
** xref:maven.adoc[]
** xref:gradle.adoc[]
** xref:ant.adoc[]
** xref:tool-provider.adoc[]
** xref:docker.adoc[]

View File

@@ -0,0 +1,24 @@
= JReleaser Docker Image
Wraps the xref:cli.adoc[] with an Ubuntu based docker image:
link:https://hub.docker.com/r/jreleaser/jreleaser-slim[jreleaser/jreleaser-slim]. This image may be used to run
JReleaser without having a pre-installed Java runtime on your system.
IMPORTANT: Additional packaging options such as xref:configuration:packagers/snap.adoc[Snapcraft] and
xref:configuration:packagers/chocolatey.adoc[] are not available in this mode.
Every command exposed by xref:cli.adoc[] can be invoked with this image.
You must mount the working directory at the `/workspace` volume, for example assuming the current directory is the
starting point:
[source]
----
$ docker run -it --rm -v `(pwd)`:/workspace jreleaser/jreleaser-slim:<tag> <command> [<args>]
----
NOTE: The `--basedir` argument will be automatically set to `--basedir=/workspace`.
You may also need to map environment variables to the container, such as `JRELEASER_PROJECT_VERSION`,
`JRELEASER_GITHUB_TOKEN`, or others depending on your setup.

View File

@@ -0,0 +1,11 @@
= Tools
JReleaser may be invoked in several ways depending on your setup.
The following options are currently available:
* xref:cli.adoc[]
* xref:maven.adoc[]
* xref:gradle.adoc[]
* xref:ant.adoc[]
* xref:tool-provider.adoc[]
* xref:docker.adoc[]