一键导入
classloading-and-runtime-dev
// Quarkus split classloading model, runtime-dev module wiring, conditional dependencies, and common classloading mistakes.
// Quarkus split classloading model, runtime-dev module wiring, conditional dependencies, and common classloading mistakes.
How to build, preview, and verify Quarkus documentation locally: root Maven build, docs rebuild, Jekyll preview via Podman/Docker.
Quarkus code style conventions: formatting, visibility, naming, logging, and general style rules for the Quarkus codebase.
Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.
How to add a Dev UI page to a Quarkus extension: deployment processors, runtime-dev JSON-RPC services, and Lit web components.
How to build and test Quarkus: Maven commands, build flags, incremental builds, justfile aliases, and important build rules.
Rules for preparing pull requests and commits in the Quarkus project: title conventions, description format, commit hygiene, labels, and contribution policies.
| name | classloading-and-runtime-dev |
| description | Quarkus split classloading model, runtime-dev module wiring, conditional dependencies, and common classloading mistakes. |
ClassNotFoundException at runtime.@Recorder lives in the runtime module but
is invoked from deployment build steps.Extensions providing dev-mode-only functionality (e.g., Dev UI pages) use a
runtime-dev/ module. These classes are only loaded in dev mode, not in
production. This requires two steps:
In the runtime module's pom.xml, configure quarkus-extension-maven-plugin:
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-extension-maven-plugin</artifactId>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>extension-descriptor</goal>
</goals>
<configuration>
<conditionalDevDependencies>
<artifact>${project.groupId}:${project.artifactId}-dev:${project.version}</artifact>
</conditionalDevDependencies>
</configuration>
</execution>
</executions>
</plugin>
Without this, runtime-dev classes will NOT be loaded in dev mode — you get
ClassNotFoundException.
@BuildSteps(onlyIf = IsLocalDevelopment.class)
class MyExtensionDevUIProcessor {
// Dev UI build steps here
}
Forgetting conditionalDevDependencies is particularly confusing because:
conditionalDevDependencies for runtime-dev modules