1. 15
  1.  

  2. 2

    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).

    1. 1

      I find fat-jar practical.

      1. 1

        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.

        1. 1

          Right, we use fat-jar + start scripts bundled in self-contained archive files.