quarkusio/quarkus · error · MojoExecutionException
Hot reloadable dependency <moduleId> has not been compiled y
Error message
Hot reloadable dependency <moduleId> has not been compiled yet (the classes directory <classesDir> does not exist)
What it means
For a hot-reloadable local dependency that declares source or resource paths but whose target/classes directory does not exist, DevMojo refuses to proceed: the module must be compiled before dev mode can watch and hot-reload it. It throws MojoExecutionException naming the module id and the missing classes directory.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java:1294
final BuildBase build = profile.getBuild();
if (build != null) {
resourcePaths.addAll(
build.getResources().stream()
.map(Resource::getDirectory)
.map(Path::of)
.map(Path::toAbsolutePath)
.collect(Collectors.toList()));
testResourcePaths.addAll(
build.getTestResources().stream()
.map(Resource::getDirectory)
.map(Path::of)
.map(Path::toAbsolutePath)
.collect(Collectors.toList()));
}
}
if (classesPath == null && (!sourcePaths.isEmpty() || !resourcePaths.isEmpty())) {
throw new MojoExecutionException("Hot reloadable dependency " + module.getWorkspaceModule().getId()
+ " has not been compiled yet (the classes directory " + (classesDir == null ? "" : classesDir)
+ " does not exist)");
}
Path targetDir = Path.of(project.getBuild().getDirectory());
// In some cases, we may have a generatedSourcesPath that has not been created, or that has been deleted
// after Maven created it. Javac will not be happy about it, and we will mimic Maven and auto-create it
// when this happens, to avoid crashing the compiler
if (generatedSourcesPath != null && Files.notExists(Path.of(generatedSourcesPath))) {
Files.createDirectories(Path.of(generatedSourcesPath));
}
DevModeContext.ModuleInfo moduleInfo = new DevModeContext.ModuleInfo.Builder()
.setArtifactKey(module.getKey())
.setProjectDirectory(projectDirectory)
.setSourcePaths(PathList.from(sourcePaths))
.setClassesPath(classesPath)View on GitHub (pinned to e1c734241f)
Solutions
- Compile the workspace first: run `mvn install -DskipTests` from the multi-module root before `mvn quarkus:dev`.
- If a `mvn clean` was performed, rebuild the affected module.
- Launch dev mode from the application module with the reactor (root) build so sibling modules are compiled.
- Verify the classes directory path shown in the message exists after building the module.
Example fix
// before cd my-app && mvn quarkus:dev # sibling lib module never built // after mvn install -DskipTests && cd my-app && mvn quarkus:dev
Defensive patterns
Strategy: validation
Validate before calling
// verify each workspace dependency has been compiled before dev mode
Path classesDir = Path.of("../my-lib/target/classes");
if (Files.isDirectory(Path.of("../my-lib/src/main/java")) && !Files.isDirectory(classesDir)) {
throw new IllegalStateException("Module not compiled: " + classesDir);
} Prevention
- Always run mvn install -DskipTests at the reactor root before quarkus:dev.
- Avoid mvn clean immediately before launching dev mode without rebuilding.
- Check that IDE builds don't wipe target/classes unexpectedly.
- Launch dev mode from the app module within the built reactor.
When it happens
Trigger: Running quarkus:dev in a multi-module project where a workspace sibling module has sources/resources registered but has never been compiled, so its classes directory is absent while sourcePaths/resourcePaths are non-empty.
Common situations: Fresh clone without an initial `mvn install`; dependency module cleaned (`mvn clean`) just before launching dev mode; IDE deleting output directories; dev mode started from a submodule without building the reactor first.
Related errors
- Local dependency <module> does not appear to have any source
- Dev mode process did not complete successfully
- Failed to run
- Failed to obtain descriptor for Maven plugin <pluginId> goal
- Top-level project base directory <dir> specified with system
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/e88e5c07112a876d.
Report an issue: GitHub.