Demos
Every feature below is a **self-contained project you can clone and run**. Each carries its own `build/jenesis/` sources, so `java build/jenesis/Make.java` from the demo folder builds it. A few that change the stock build or drive several builds ship a `build/Demo.java` to run instead; each demo's own README says which. They are numbered as a progression: the early ones establish the basics, the later ones go into specifics. Browse them on GitHub:Getting started
The four project shapes and Maven 4's POM model - begin here.
- Java (Maven project) A single-module Java project in the classic Maven layout.
- Java (modular project) The same, as a real Java Module System module with a module-info.
- Multi-module (Maven) Several Maven-layout modules built together, with a bill of materials over them.
- Multi-module (modular) A multi-module modular project and its module graph.
- Multi-module (POM model 4.1.0) The multi-module Maven project in Maven 4's POM model, with its subprojects, parents and versions inferred.
Running the build
What a build costs to start, the JDK it runs on, and settings switched on together.
- Startup cost What a build pays to launch, and what a reused JVM saves on the calls after it.
- The JDK a build runs on A project names its JDK, and a build started on JDK 25 runs again on 26 in CI on Linux, macOS and Windows.
- Build profiles Switching a set of settings on with a named profile, and writing a whole run into an argument file.
Executables & packaging
Turning a build's output into something that runs on its own.
- Executable (Maven) A runnable Maven project packaged with jpackage, plus bundle, launcher jar, and a container context.
- Executable (modular) The same for a module: an app image, a .jmod and jlink runtime, a bundle, a launcher jar, and a Dockerfile.
- Bundle Ship only the jars as a bundle.zip and run them on a stock JRE.
Compiler control
Reaching past the compiler defaults.
- Multi-release JAR A multi-release jar that ships a Java 25 override of one class beside its Java 21 baseline.
- Compiler arguments Passing custom arguments to javac, and attributes to the jar's manifest.
- Annotation processing Running an annotation processor.
- Error Prone A static-analysis plugin running inside javac, catching a bug the compiler accepts.
- Preview features A module that uses a preview feature of Java 25, compiled and run with it enabled.
Generated sources
Compiling a schema or a service contract into Java, as part of the build.
- Data formats Three modules and three wire formats - XML Schema, protocol buffers and Avro - each compiled into Java by its own generator.
- Service contracts A SOAP and a REST client generated from a WSDL and an OpenAPI document.
- Parser from a grammar An ANTLR grammar compiled into a lexer, a parser and a visitor that the module uses.
Dependencies
Naming what a project depends on, and shaping the closure that arrives.
- Exclusions Dropping an unwanted transitive, in a POM and with a tag.
- Bills of materials Importing a Maven BOM and a local pin file, and publishing a BOM of the module's own closure.
- Module alias Giving a plain jar a module name, then rewriting the closure into named modules so jlink accepts it.
- Pure modular layout A strictly modular layout that resolves by module name and emits no POM.
- Module override Reading a shaded API under its own module name, so a modular library and Tomcat Embed share a module path.
- Module layers Keeping a dependency private, so two versions of one library run in one JVM with no package relocated.
- Module layers over a legacy tree Isolating a library whose jars name themselves nowhere, by naming only the one the code calls.
- A modular jar on the class path META-INF/services files written from module-info, so one jar finds its services on either path.
- Platform guard Pinning a classified variant, and guarding which one each platform gets.
- Platform guard (Maven) The same guards in a Maven layout.
Supply chain & security
Which bytes arrived, who produced them, what they carry, and whether a build makes the same ones again.
- Pinning A version and a checksum in your own sources, the two ways a build refuses what does not match, and an offline rebuild from what the first build stored.
- OpenPGP signatures Declaring the key that signs a dependency, checked against the signature its project published.
- Sigstore identities Declaring the workflow that released a dependency, verified from the bundle beside it with no key at all.
- SBOM Generating a software bill of materials.
- Dependency licensing Checking dependency licences against policy.
- Vulnerabilities Scanning dependencies for known vulnerabilities.
- Reproducible builds The build run twice and compared step by step, with a fingerprint over every step's output and the steps that differ named.
Quality & testing
The gates a build can hold its own output to.
- Code quality Formatting and static analysis for Java.
- Test frameworks Tests whose module requires no engine: the framework they are written against is worked out and its engines resolved.
- Test selection Running only the tests a change can affect.
- Test runs One module's tests run twice, by two modules that scan its jar with different settings, side by side or one at a time, in a modular and in a pom.xml build.
- Code coverage Measuring test coverage.
- Mutation testing Mutation testing with PIT, switched on by its configuration file.
- Benchmarks A JMH benchmark the build generates, compiles and runs, printing its result table.
- Concurrency stress tests jcstress tests that show a lost update between two threads, generated by its processor and run from the class path.
- API compatibility japicmp compares the built jar's byte code against a released one, so a breaking change shows up before you publish it.
JVM languages
The same build, for Kotlin, Scala and Groovy.
- Kotlin A Kotlin (and mixed Java/Kotlin) project.
- Kotlin quality Kotlin with formatting and static-analysis checks.
- Kotlin compiler plugin Enabling a Kotlin compiler plugin.
- KSP Moshi's code generator run through Kotlin symbol processing, its adapter compiled with the module's sources.
- Scala A Scala (and mixed Java/Scala) project.
- Scala quality Scala with code-quality checks.
- Groovy A Groovy (and mixed Java/Groovy) project.
- Groovy quality Groovy with code-quality checks.
- Clojure A Java type and a Clojure namespace in one pom.xml module, the namespace compiled ahead of time.
The application at run time
Agents, native access, and a native binary of the application.
- Java agents Attaching agents to the test run and to the application run.
- Native access Naming the module that needs native access, and granting it again in every module that runs it.
- Native access in a layer Granting a library native access, which it passes on to the modules it keeps in its layer.
- Native image A GraalVM native binary built end to end, with reachability metadata captured from the tests.
Caching & isolation
Sharing step outputs between builds, and confining a build to a container.
- Build cache Sharing build outputs through a cache.
- Docker isolation Confining the build and the launched program in a throwaway container.
Extending the build
Wrapping the template, adding build modules, or replacing it entirely.
- Custom assembler Wrapping the stock assembler so sources are preprocessed before they compile.
- jlink & jpackage A custom .jmod carrying extra content, linked into a runtime and packaged into an app.
- Internal build module A plugin named in jenesis.plugins.properties, compiled from local source and configured by its own properties file.
- External build module The same plugin resolved by its module name from a repository.
- A plugin on Byte Buddy A plugin at binary/transform runs Byte Buddy's ToStringPlugin and a plugin of the project's own over the compiled classes, with the module's class path, and what it writes replaces them.
- Project plugins Plugins hooked into the build of the whole project: a licence check before anything compiles, a notice attached to every module and checked before staging, a distribution zip beside the stock packages, checksums added to the staged trees and checked before export, a releaser that delivers them, dry unless the command line publishes, and a line count run on demand without a build.
- Classifiers Variants of a module's jar, one built from a plugin's output, published under classifiers and selected by a sibling.
- JNI A C library for a native method, compiled by a plugin against the headers of the build's javac step and loaded from the jar.
- Custom Maven build Driving a multi-module Maven-layout build from your own entry point with the convenience factory.
- Custom modular build The same for a modular project.
- Custom build A code-generating build graph wired entirely by hand.
Delivery
Documenting and publishing what a build produced, plugins for Maven and Gradle, resolving and running what somebody else published, and running a build from another program.
- AsciiDoc documents The project's AsciiDoc documents converted once for the whole project and staged beside its modules.
- Code signing The produced jar signed with jarsigner, with the key named by the machine rather than by the project.
- Exporting to the local repositories A module exported into the local repositories and required from a second project by name, with both repositories in a temporary folder.
- Publishing A Maven Central ready bundle - POM metadata, sources and javadoc jars - resolved back to prove it, and released as a version and a snapshot into a Maven repository on this machine.
- A Maven plugin A Maven plugin built as a jar, its plugin.xml written from the mojos by Maven's own plugin tools, and run by Maven.
- A Gradle plugin A Gradle plugin built as a jar and staged with the marker its plugin ID is resolved by.
- Your own module repository Modules published to a plain Maven repository and resolved back by module name, with no registry to keep in sync.
- Module discovery A module resolved from what its domain's .well-known file says - the jar straight from a GitHub release, without a module repository or Maven.
- Maven discovery A Maven dependency resolved from the location its group's domain names, beside the Maven remotes.
- Running a released program jpx installs and launches a published tool - named as a module and as a coordinate, pinned and hash-verified.
- Running a build in-process A build, and the program it produced, run inside another program's JVM through java.util.spi.ToolProvider.