General Information
Plugwerk builds on top of PF4J (Plugin Framework for Java), a lightweight and extensible plugin framework for Java applications. Before publishing plugins on Plugwerk, it helps to understand the PF4J fundamentals.
What is PF4J?
Section titled “What is PF4J?”PF4J is an open-source plugin framework that allows Java applications to be extended at runtime without modifying the host application. It provides:
- Dynamic plugin loading — load, start, stop, and unload plugins at runtime
- Extension points — define interfaces that plugins implement
- Classloader isolation — each plugin runs in its own classloader to avoid dependency conflicts
- Multiple packaging formats — plugins can be distributed as JAR files or ZIP bundles
For a complete introduction, see the PF4J documentation.
How Plugwerk Extends PF4J
Section titled “How Plugwerk Extends PF4J”PF4J handles plugin loading and lifecycle management on the local machine, but it does not provide a way to distribute, discover, or manage plugins remotely. Plugwerk adds this layer:
| Capability | PF4J | PF4J + Plugwerk | | ------------------- | -------------- | -------------------------------------- | | Load plugins | Yes | Yes | | Extension points | Yes | Yes | | Plugin discovery | Local only | Remote catalog with search and filters | | Plugin distribution | Manual copying | Upload, review, and download via API | | Version management | Not built-in | SemVer enforcement and update checks | | Access control | None | Namespaces, roles, and API keys |
Plugin Structure
Section titled “Plugin Structure”A PF4J plugin consists of:
- A plugin class — extends
Plugin(optional in PF4J 3.x+) - One or more extensions — classes annotated with
@Extensionthat implement an extension point defined by the host application - A plugin descriptor — metadata in
MANIFEST.MFthat identifies the plugin (see Plugin Descriptor) - A package — either a JAR file or a ZIP bundle containing the JAR and its dependencies (see Packaging)