This showcase how to build a Spring-Boot application with JeKa with default options. It also outlines how a building docker and native images can be achieved at no additional cost.
We don't need Java code to configure the build : all configuration lies in dependencies.txt and jeka.properties.
Create jar:
jeka packClean and Create a bootable jar:
jeka pack --cleanCreate bootable jar skipping tests:
jeka pack "-Djeka.skip.tests=true" --clean Run jar
jeka runJar run.programArgs="" run.jvmOptions=""Synchronize IntelliJ
jeka intellij: syncThe following commands requires a Docker cli (such as Docker Desktop) on the host.
Create a Docker Image of the Spring-Boot Application.
jeka docker: buildShow Details about of the Docker Image.
jeka docker: infoNative compilation does not have any requisite.
Create a Docker Image containing the Native Executable of the Application (smaller and faster).
jeka docker: buildNativeCreate a minimalist native Docker Image:
jeka docker: buildNative nativeBaseImage=gcr.io/distroless/static-debian12:nonroot native: staticLink=MUSLExecute the Docker Image:
docker run --rm -p 8080:8080 native-demo-springboot-simple:latestShow Details about of the Docker Native Image:
jeka docker: infoNative