salesforce / rules_spring

Bazel rule for building Spring Boot apps as a deployable jar
BSD 3-Clause "New" or "Revised" License
221 stars 49 forks source link

Making an Archive Fully Executable #174

Open tamalnath opened 7 months ago

tamalnath commented 7 months ago

Spring Boot provides support for fully executable archives. An archive is made fully executable by prepending a shell script that knows how to launch the application. On Unix-like platforms, this launch script allows the archive to be run directly like any other executable or to be installed as a service.

Maven and Gradle plugins currently support this:

Need a way to build a fully executable jar using Bazel.

plaird commented 7 months ago

Interesting, I haven't seen this type of deployment before.

plaird commented 7 months ago

This is the script they use, it is 309 lines, which is pretty big: Spring Boot launcher script

An internal sample service I tried with it, using the maven plugin, failed at startup with InvocationTargetExceptions. I didn't diagnose it further.

I am a bit nervous to jump into this, as it seems like it could be a maintenance/support effort. But it is on the backlog.