This demo illustrates how to build a Java application using Jeka without requiring any build configuration.
The built application is a command-line tool that generates and displays an ASCII-art representation of an input string.
This application relies on third party dependencies, declared in dependencies.txt file.
Compile, tests, create Jar and run the application with specified arguments:
jeka -p Hello JeKaRun only tests:
jeka project: testCreate Docker Image (need Docker cli):
jeka docker: buildThen run the image:
docker run --rm demo-zero-conf:latest "Hello Docker"Compile to native executable:
jeka native: compile includeAllResources=trueOnce compiled to native, you can execute it (this time, the native executable will run instead of the Java application):
jeka -p "Hello Native"Create Docker image:
jeka docker: buildNative native: includeAllResources=trueRun the native image:
docker run --rm native-demo-zero-conf:latest Hello JeKaExecute directly the application from its GIT repo:
jeka -r https://github.com/jeka-dev/demo-zero-conf.git -p "Hello remote Git" To avoid repetitive typing, you can store configuration in thejeka.properties file, like this:
@native.includeAllResources=true