Making an Archive Fully Executable
Opened this issue · 2 comments
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:
- https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/#packaging.repackage-goal.parameter-details.executable
- https://docs.spring.io/spring-boot/docs/current/gradle-plugin/reference/htmlsingle/#packaging-executable.configuring.launch-script
Need a way to build a fully executable jar using Bazel.
Interesting, I haven't seen this type of deployment before.
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.