For Java I found it easiest to do this “from the other side”; there are maven plugins that will generate an adequate .deb that bundles all the jars into a folder in /usr/share and puts a launch script in /usr/bin and/or reasonable service/daemon configuration. Then the .deb is just built as part of the maven release (and uploaded to an internal apt repository).
A shaded executable jar is useful but not sufficient if you want to e.g. start the service on boot. So there’s some value in having an actual .deb. I was somewhat surprised by this approach when I first joined that company but it worked well in practice.
For Java I found it easiest to do this “from the other side”; there are maven plugins that will generate an adequate
.debthat bundles all the jars into a folder in/usr/shareand puts a launch script in/usr/binand/or reasonable service/daemon configuration. Then the .deb is just built as part of the maven release (and uploaded to an internal apt repository).I find fat-jar practical.
A shaded executable jar is useful but not sufficient if you want to e.g. start the service on boot. So there’s some value in having an actual
.deb. I was somewhat surprised by this approach when I first joined that company but it worked well in practice.Right, we use fat-jar + start scripts bundled in self-contained archive files.