Sample Spring Boot CLI application (packaged with jlink and jpackage)
Shows how a Spring Boot application may be configured and packaged to create cross-platform custom Java Runtimes with jlink, package each JR as a zip distribution and publish them as assets on a Git release via JReleaser.
Warning
|
Java 17 is required to build this sample. |
$ ./mvnw -Pjdks package -DskipTests
$ ./mvnw -Passemble package
Inspect the artifacts found at target/jreleaser/assemble/sb-cli-jlink/jlink
and run one:
$ target/jreleaser/assemble/sb-cli-jlink/jlink/work-linux-x86_64/sb-cli-jlink-0.1.0-linux-x86_64/bin/sb-cli-jlink
Warning
|
Requires a GitHub token for publishing a release to GitHub. |
-
Create a GitHub Personal Access Token. See Creating a personal access token for instructions.
-
Store the token as an environment variable (
JRELEASER_GITHUB_TOKEN
) or save it at a configuration file as explained at JReleaser’s environment settings.
Posting a release from a local environment
$ ./mvnw -Prelease jreleaser:config
$ ./mvnw -Prelease jreleaser:release -Djreleaser.dryrun=true
$ ./mvnw -Prelease jreleaser:release
Inspect additional artifacts found at target/jreleaser
:
target/jreleaser/
├── output.properties
├── release
│ └── CHANGELOG.md
└── trace.log