Our great sponsors
-
shadow
Gradle plugin to create fat/uber JARs, apply file transforms, and relocate packages for applications and libraries. Gradle version of Maven's Shade plugin.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
But sometimes we need to distribute the application as a single executable JAR file. This solution has some drawbacks, but if for some reason you prefer this, I still recommend using a dedicated plugin, e.g.: https://github.com/johnrengelman/shadow
Also, you can look at jib-gradle-plugin. This is a plugin from Google for creating Docker images with Java applications. It is easy to use, you don't even need to create Dockerfile, it runs much faster than docker build and the resulting image is layered in a smart way.
Related posts
- Trying to spin up a Ktor app using docker containers. I keep getting "no main manifest attribute, in app.jar"
- Razvijanje mikroservisa na lokalnoj mrezi
- Spring Boot pod takes 60 seconds to become ready; trouble handling spiky workloads
- What is Docker All About and How to Deploy Spring Boot Application In Docker?
- Dockerfile for spring boot application