Examples
The plugwerk/examples repository ships two fully runnable reference applications. Each one stands a host application up next to a small Plugwerk server, publishes a couple of plugins, and demonstrates the install / use / uninstall loop end-to-end. Use them to see how the pieces fit together before wiring Plugwerk into your own application.
The two reference projects
Section titled “The two reference projects”| Example | Host shape | What plugins contribute | Look at this first if you … |
| ---------------------------------------------------------------- | ----------------------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------- |
| Java CLI | Standalone Java CLI (picocli + PF4J DefaultPluginManager) | New top-level subcommands | … you are building a desktop / CI / batch tool and want plugins to add commands |
| Spring Boot + Thymeleaf | Spring Boot web application with Thymeleaf views | Menu entries + full HTML pages | … you are integrating Plugwerk into an existing Spring Boot web application |
Both examples share the same Plugwerk server (started locally via Docker Compose) and the same plugin lifecycle on the wire. They differ in where the plugin contributes its UI — a CLI subcommand on one side, a web page in the navigation bar on the other.
What you need
Section titled “What you need”- Java 21 or later
- Docker and Docker Compose for the local Plugwerk server (a public SNAPSHOT image is pulled from GHCR — no
docker loginrequired) - A GitHub Personal Access Token with
read:packagesscope to resolve Plugwerk SNAPSHOT artifacts from GitHub Packages for Maven (only needed while the examples track SNAPSHOTs; not required when they pin to a Maven Central release)
The full bootstrap — start the server, create a namespace, mint an API key — is documented in the Quick start section of the plugwerk/examples README. Each example sub-page below references that flow rather than duplicating it.
Clone the repository
Section titled “Clone the repository”git clone https://github.com/plugwerk/examples.git plugwerk-examplescd plugwerk-examplesThe repository root carries a Gradle composite build that drives both examples at once (./gradlew build builds them all). Each example also stands on its own as a self-contained Gradle project, so you can cd into one and build only that.
Where to next
Section titled “Where to next”- Java CLI walkthrough — install a command plugin, run it, see the new subcommand appear
- Spring Boot + Thymeleaf walkthrough — install a page plugin via the web UI, navigate to the new page, see the rendered content
If you have not built a plugin yet, start with Plugin Lifecycle and the First plugin upload walkthrough first — both example projects assume you understand what a PF4J plugin ZIP is and how Plugwerk publishes one.