mirror of
https://github.com/jlengrand/jreleaser.github.io.git
synced 2026-03-10 08:31:25 +00:00
Java model moved to its own section
This commit is contained in:
@@ -36,26 +36,6 @@ distributions:
|
||||
# [optional]
|
||||
executable: app
|
||||
|
||||
# The minimum Java version required by consumers to run the application.
|
||||
# If left undefined, will use {project.javaVersion}.
|
||||
# [optional]
|
||||
javaVersion: 8
|
||||
|
||||
# Maven coordinates: groupId.
|
||||
# f left undefined, will use {project.groupId}
|
||||
# [optional]
|
||||
groupId: com.acme
|
||||
|
||||
# Maven coordinates: artifactId.
|
||||
# f left undefined, will use {project.artifactId}
|
||||
# [optional]
|
||||
artifactId: app
|
||||
|
||||
# The application's entry point.
|
||||
# Required by <<_jbang,jbang>>.
|
||||
# [optional]
|
||||
mainClass: com.acme.Main
|
||||
|
||||
# A list of tags.
|
||||
# [optional]
|
||||
tags:
|
||||
@@ -79,6 +59,34 @@ distributions:
|
||||
platform: osx
|
||||
- path: path/to/{{distributionName}}-{{projectVersion}}-win.zip
|
||||
platform: windows
|
||||
|
||||
# [optional]
|
||||
java:
|
||||
# Maven coordinates: groupId.
|
||||
# If left undefined, will use ${project.java.groupId}.
|
||||
# [optional]
|
||||
groupId: com.acme
|
||||
|
||||
# Maven coordinates: artifactId.
|
||||
# If left undefined, will use ${project.java.artifactId}.
|
||||
# [optional]
|
||||
artifactId: app
|
||||
|
||||
# The minimum Java version required by consumers to run the application.
|
||||
# If left undefined, will use ${project.java.version}.
|
||||
# [optional]
|
||||
version: 8
|
||||
|
||||
# The application's entry point.
|
||||
# If left undefined, will use ${project.java.mainClass}.
|
||||
# [optional]
|
||||
mainClass: com.acme.Main
|
||||
|
||||
# Identifies the project as being member of a multi-project build.
|
||||
# If left undefined, will use ${project.java.multiProject}.
|
||||
# Defaults to `false`.
|
||||
# [optional]
|
||||
multiProject : false
|
||||
----
|
||||
|
||||
It's recommended to list universal artifacts first, then platform specific.
|
||||
|
||||
@@ -18,22 +18,6 @@ project:
|
||||
# [required]
|
||||
version: 1.0.0
|
||||
|
||||
# Maven coordinates: groupId.
|
||||
# Inherited by distributions if they do not define a value for it.
|
||||
# [required]
|
||||
groupId: com.acme
|
||||
|
||||
# Maven coordinates: artifactId.
|
||||
# If undefined, will use ${project.name}.
|
||||
# Inherited by distributions if they do not define a value for it.
|
||||
# [required]
|
||||
artifactId: app
|
||||
|
||||
# Identifies the project as being mermber of a multi-project build.
|
||||
# Defaults to `false`.
|
||||
# [optional]
|
||||
multiProject : false
|
||||
|
||||
# A short description (60 chars max).
|
||||
# [required]
|
||||
description: My awesome app
|
||||
@@ -66,14 +50,36 @@ project:
|
||||
# [required]
|
||||
license: Apache-2.0
|
||||
|
||||
# The minimum Java version required by consumers to run the application.
|
||||
# [required]
|
||||
javaVersion: 8
|
||||
|
||||
# Additional properties used when evaluating templates.
|
||||
# [optional]
|
||||
extraProperties:
|
||||
# Key will be capitalized and prefixed with `project`, i.e, `projectFoo`.
|
||||
foo: bar
|
||||
|
||||
# [required]
|
||||
java:
|
||||
# Maven coordinates: groupId.
|
||||
# Inherited by distributions if they do not define a value for it.
|
||||
# [required]
|
||||
groupId: com.acme
|
||||
|
||||
# Maven coordinates: artifactId.
|
||||
# If undefined, will use ${project.name}.
|
||||
# Inherited by distributions if they do not define a value for it.
|
||||
# [required]
|
||||
artifactId: app
|
||||
|
||||
# The minimum Java version required by consumers to run the application.
|
||||
# [required]
|
||||
version: 8
|
||||
|
||||
# The application's entry point.
|
||||
# [optional]
|
||||
mainClass: com.acme.Main
|
||||
|
||||
# Identifies the project as being member of a multi-project build.
|
||||
# Defaults to `false`.
|
||||
# [optional]
|
||||
multiProject : false
|
||||
----
|
||||
|
||||
|
||||
@@ -27,9 +27,10 @@ The following names are related to the <<_project,Project>>
|
||||
| projectAuthorsByComma | commma separated list of author names
|
||||
| projectTagsBySpace | space separate list of project tags
|
||||
| projectTagsByComma | comma separate list of project tags
|
||||
| javaVersion | the project Java version
|
||||
| groupId | the project groupId (Maven coordinates)
|
||||
| artifactId | the project artifactId (Maven coordinates)
|
||||
| projectJavaGroupId | the project groupId (Maven coordinates)
|
||||
| projectJavaArtifactId | the project artifactId (Maven coordinates)
|
||||
| projectJavaVersion | the project Java version
|
||||
| projectMainClass | the main class launched by the executable script launcher
|
||||
|===
|
||||
|
||||
Additionally, every key/value from `project.extraProperties` is mapped with `project` as key prefix and the capitalized
|
||||
@@ -71,14 +72,15 @@ The following names are related to <<_distribution,Distribution>>
|
||||
|
||||
[%header, cols="<2,<5", width="100%"]
|
||||
|===
|
||||
| Key | Description
|
||||
| distributionName | the name of the distribution
|
||||
| distributionExecutable | the name of the executable script launcher
|
||||
| distributionTagsBySpace | space separate list of distribution tags
|
||||
| distributionTagsByComma | comma separate list of distribution tags
|
||||
| distributionGroupId | the distribution groupId (Maven coordinates)
|
||||
| distributionArtifactId | the distribution artifactId (Maven coordinates)
|
||||
| mainClass | the main class launched by the executable script launcher
|
||||
| Key | Description
|
||||
| distributionName | the name of the distribution
|
||||
| distributionExecutable | the name of the executable script launcher
|
||||
| distributionTagsBySpace | space separate list of distribution tags
|
||||
| distributionTagsByComma | comma separate list of distribution tags
|
||||
| distributionJavaGroupId | the distribution groupId (Maven coordinates)
|
||||
| distributionJavaArtifactId | the distribution artifactId (Maven coordinates)
|
||||
| distributionJavaVersion | the distribution Java version
|
||||
| distributionMainClass | the main class launched by the executable script launcher
|
||||
|===
|
||||
|
||||
Additionally, every key/value from `distribution.<name>.extraProperties` is mapped with `distribution` as key prefix
|
||||
@@ -99,33 +101,30 @@ The following names identify an artifact without explicit `platform`
|
||||
|
||||
[%header, cols="<2,<5", width="100%"]
|
||||
|===
|
||||
| Key | Description
|
||||
| artifactJavaVersion | the artifact Java version
|
||||
| artifactUrl | the URL required to download the artifact
|
||||
| artifactSha256 | the SHA256 checksum of the artifact's file
|
||||
| artifactFileName | the name of the artifact file
|
||||
| Key | Description
|
||||
| artifactUrl | the URL required to download the artifact
|
||||
| artifactSha256 | the SHA256 checksum of the artifact's file
|
||||
| artifactFileName | the name of the artifact file
|
||||
|===
|
||||
|
||||
The following names match the first artifact in a distribution
|
||||
|
||||
[%header, cols="<2,<5", width="100%"]
|
||||
|===
|
||||
| Key | Description
|
||||
| distributionJavaVersion | the artifact Java version
|
||||
| distributionUrl | the URL required to download the artifact
|
||||
| distributionSha256 | the SHA256 checksum of the artifact's file
|
||||
| distributionFileName | the name of the artifact file
|
||||
| Key | Description
|
||||
| distributionUrl | the URL required to download the artifact
|
||||
| distributionSha256 | the SHA256 checksum of the artifact's file
|
||||
| distributionFileName | the name of the artifact file
|
||||
|===
|
||||
|
||||
Additional names become available when the artifact defines a `platform`
|
||||
|
||||
[%header, cols="<2,<5", width="100%"]
|
||||
|===
|
||||
| Key | Description
|
||||
| artifact{{CapitalizedPlatform}}JavaVersion | the distribution Java version
|
||||
| artifact{{CapitalizedPlatform}}Url | the URL required to download the artifact
|
||||
| artifact{{CapitalizedPlatform}}Sha256 | the SHA256 checksum of the artifact's file
|
||||
| artifact{{CapitalizedPlatform}}FileName | the name of the artifact file
|
||||
| Key | Description
|
||||
| artifact{{CapitalizedPlatform}}Url | the URL required to download the artifact
|
||||
| artifact{{CapitalizedPlatform}}Sha256 | the SHA256 checksum of the artifact's file
|
||||
| artifact{{CapitalizedPlatform}}FileName | the name of the artifact file
|
||||
|===
|
||||
|
||||
Thus, for artifacts defined as
|
||||
@@ -144,18 +143,15 @@ The following names will be calculated:
|
||||
|
||||
*1st artifact*
|
||||
|
||||
* artifactJavaVersion
|
||||
* artifactUrl
|
||||
* artifactSha256
|
||||
* artifactFileName
|
||||
* distributionJavaVersion
|
||||
* distributionUrl
|
||||
* distributionSha256
|
||||
* distributionFileName
|
||||
|
||||
*Platform specific artifact*
|
||||
|
||||
* artifactOsxJavaVersion
|
||||
* artifactOsxUrl
|
||||
* artifactOsxSha256
|
||||
* artifactOsxFileName
|
||||
|
||||
@@ -8,14 +8,14 @@ Once JReleaser is installed you may initialize its config file by invoking the f
|
||||
[source]
|
||||
----
|
||||
$ jreleaser init --format yml
|
||||
[INFO] Writing file /Home/duke/app/.jreleaser.yml
|
||||
[INFO] Writing file /Home/duke/app/jreleaser.yml
|
||||
[INFO] JReleaser initialized at /Home/duke/app
|
||||
----
|
||||
|
||||
This generates a `.jreleaser.yml` file with the following configuration
|
||||
This generates a `jreleaser.yml` file with the following configuration
|
||||
|
||||
[source,yaml]
|
||||
..jreleaser.yml
|
||||
.jreleaser.yml
|
||||
----
|
||||
project:
|
||||
name: app
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
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.
|
||||
|
||||
A release process can be customized with a `.jreleaser.yml` file if using the <<_jreleaser_cli,CLI>> or
|
||||
A release process can be customized with a `jreleaser.yml` file if using the <<_jreleaser_cli,CLI>> or
|
||||
<<_jreleaser_ant,Ant>> options, or direct DSL configuration inside a `pom.xml` (<<_jreleaser_maven,Maven>>) or
|
||||
`build.gradle` (<<_jreleaser_gradle,Gradle>>) file.
|
||||
|
||||
Once setup, you can create a new release by invoking the `full-release` command.
|
||||
|
||||
*Acknowledgment*
|
||||
*Acknowledgments*
|
||||
|
||||
JReleaser is heavily inspired by link:https://goreleaser.com[GoReleaser].
|
||||
|
||||
|
||||
Reference in New Issue
Block a user