Most Java CLI tools stop at mvn compile exec:java.

That works locally. It doesn’t scale.

In this guide I show how to:
- build a fat JAR
- automate GitHub releases
- publish a JBang catalog
- install with one command

No cloning. No Maven required.

Full tutorial:
https://www.the-main-thread.com/p/ship-java-cli-jreleaser-jbang-github-release

#Java #JReleaser #JBang #Maven #OpenSource

@myfear Why a fat JAR? I don't agree with the use of these.

Firstly it's repackaging someone else's library -> what about licenses?

Secondly, the user doesn't know what the JAR contains. I prefer some kind of executable with the JAR and a libs directory containing all dependencies. This makes it clear what is being used.

Can that be done with jreleaser as well? I'm trying to build something likes this for my new tool https://github.com/eitch/LumineLog but also want to build a complete release as a zip.

@eitch For those reasons I package my Java applications as a zip file and include a shell-script to run them. I use the maven assembly plugin to do so. Downsides, it is not as easy to learn to use as jReleaser and only does the packaging, not all the other things jReleaser does. However, it only requires maven and once you've done it for one project it is rather easy to move to other projects. If you are interested there is an example here: https://codeberg.org/darkstar/endgen/src/branch/main/endgen-dist
endgen

DSL of endpoint descriptions. This repository is a mirror.

Codeberg.org

@higgins I actually do this too. I found that really easy to do: Add a download for the #JRE and then a simple #maven assembly and one is good to go.

#jreleaser brings nice features i would like to try:
- auto releasing
- jlinking
- announcements
etc.

But i find jreleaser rather complicated. There is a lot of documentation, but not really when i want to do everything in Maven.

#java #programming

@eitch @higgins the JReleaser reference guide shows all configuration options using 5 different DSLs, Maven's XML being one of them. There's also plenty of examples found here https://jreleaser.org/guide/latest/examples/index.html

FWIW JReleaser's java-archive assembler provides behavior similar to Maven's appassambler + assembly plugins, plus a few extra features https://jreleaser.org/guide/latest/concepts/distributions/java-binary.html

Examples :: JReleaser