{"record":{"id":"e88e5c07112a876d","repo":"quarkusio/quarkus","slug":"hot-reloadable-dependency-moduleid-has-not-been","errorCode":null,"errorMessage":"Hot reloadable dependency <moduleId> has not been compiled yet (the classes directory <classesDir> does not exist)","messagePattern":"Hot reloadable dependency <moduleId> has not been compiled yet \\(the classes directory <classesDir> does not exist\\)","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java","lineNumber":1294,"sourceCode":"            final BuildBase build = profile.getBuild();\n            if (build != null) {\n                resourcePaths.addAll(\n                        build.getResources().stream()\n                                .map(Resource::getDirectory)\n                                .map(Path::of)\n                                .map(Path::toAbsolutePath)\n                                .collect(Collectors.toList()));\n                testResourcePaths.addAll(\n                        build.getTestResources().stream()\n                                .map(Resource::getDirectory)\n                                .map(Path::of)\n                                .map(Path::toAbsolutePath)\n                                .collect(Collectors.toList()));\n            }\n        }\n\n        if (classesPath == null && (!sourcePaths.isEmpty() || !resourcePaths.isEmpty())) {\n            throw new MojoExecutionException(\"Hot reloadable dependency \" + module.getWorkspaceModule().getId()\n                    + \" has not been compiled yet (the classes directory \" + (classesDir == null ? \"\" : classesDir)\n                    + \" does not exist)\");\n        }\n\n        Path targetDir = Path.of(project.getBuild().getDirectory());\n\n        // In some cases, we may have a generatedSourcesPath that has not been created, or that has been deleted\n        // after Maven created it. Javac will not be happy about it, and we will mimic Maven and auto-create it\n        // when this happens, to avoid crashing the compiler\n        if (generatedSourcesPath != null && Files.notExists(Path.of(generatedSourcesPath))) {\n            Files.createDirectories(Path.of(generatedSourcesPath));\n        }\n\n        DevModeContext.ModuleInfo moduleInfo = new DevModeContext.ModuleInfo.Builder()\n                .setArtifactKey(module.getKey())\n                .setProjectDirectory(projectDirectory)\n                .setSourcePaths(PathList.from(sourcePaths))\n                .setClassesPath(classesPath)","sourceCodeStart":1276,"sourceCodeEnd":1312,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L1276-L1312","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\ncd my-app && mvn quarkus:dev   # sibling lib module never built\n// after\nmvn install -DskipTests && cd my-app && mvn quarkus:dev","handlingStrategy":"validation","validationCode":"// verify each workspace dependency has been compiled before dev mode\nPath classesDir = Path.of(\"../my-lib/target/classes\");\nif (Files.isDirectory(Path.of(\"../my-lib/src/main/java\")) && !Files.isDirectory(classesDir)) {\n    throw new IllegalStateException(\"Module not compiled: \" + classesDir);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["maven","dev-mode","compilation","workspace","quarkus"],"backgroundTag":"module-not-compiled","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}