{"record":{"id":"e8edd23b020667cb","repo":"quarkusio/quarkus","slug":"local-dependency-module-does-not-appear-to-have","errorCode":null,"errorMessage":"Local dependency <module> does not appear to have any sources","messagePattern":"Local dependency <module> does not appear to have any sources","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java","lineNumber":1233,"sourceCode":"                }\n            }\n        } else {\n            projectDirectory = mavenProject.getBasedir().getPath();\n            sourcePaths = mavenProject.getCompileSourceRoots().stream()\n                    .map(Path::of)\n                    .map(Path::toAbsolutePath)\n                    .collect(Collectors.toCollection(LinkedHashSet::new));\n            testSourcePaths = mavenProject.getTestCompileSourceRoots().stream()\n                    .map(Path::of)\n                    .map(Path::toAbsolutePath)\n                    .collect(Collectors.toCollection(LinkedHashSet::new));\n            activeProfiles = mavenProject.getActiveProfiles();\n        }\n\n        final Path sourceParent;\n        if (sourcePaths.isEmpty()) {\n            if (sources == null || sources.getResourceDirs() == null) {\n                throw new MojoExecutionException(\n                        \"Local dependency \" + module.toCompactCoords() + \" does not appear to have any sources\");\n            }\n            sourceParent = sources.getResourceDirs().iterator().next().getDir().toAbsolutePath().getParent();\n        } else {\n            sourceParent = sourcePaths.iterator().next().toAbsolutePath().getParent();\n        }\n\n        Path classesDir = null;\n        resourcePaths = new LinkedHashSet<>();\n        if (sources != null) {\n            SourceDir firstSourceDir = sources.getSourceDirs().iterator().next();\n            classesDir = firstSourceDir.getOutputDir().toAbsolutePath();\n            if (firstSourceDir.getAptSourcesDir() != null) {\n                generatedSourcesPath = firstSourceDir.getAptSourcesDir().toAbsolutePath().toString();\n            }\n            if (Files.isDirectory(classesDir)) {\n                classesPath = classesDir.toString();\n            }","sourceCodeStart":1215,"sourceCodeEnd":1251,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L1215-L1251","documentation":"When DevMojo processes a local (workspace) module that is hot-reloadable, it needs a source parent directory. If the module reports no source paths and its SourcesDescription has null or empty resource directories, it throws MojoExecutionException with the module's compact coordinates. The module appears to have neither compiled sources nor resources.","triggerScenarios":"Adding a local reactor module as a dependency in dev mode where that module has no src/main/java or src/main/resources content, or the module was never properly built so no source/resource dirs were registered.","commonSituations":"A workspace module that only contains tests or no source at all but is still declared as a dependency; misconfigured build-helper or custom source directory in the module; freshly cloned repo where modules were not built; aggregator POM module accidentally listed as a dependency.","solutions":["Ensure the dependent module actually contains src/main/java or src/main/resources sources; remove it from dependencies if it is an empty aggregator.","Run mvn install on the multi-module project before starting dev mode so modules are built with correct source registrations.","Fix custom sourceDirectory/resource configuration in the affected module's pom.xml.","Check the module id in the message and inspect that module's build configuration directly."],"exampleFix":"// before: dependency on an empty aggregator module\n<dependency><groupId>com.acme</groupId><artifactId>acme-empty-module</artifactId></dependency>\n// after: depend on the module that actually holds the sources\n<dependency><groupId>com.acme</groupId><artifactId>acme-real-lib</artifactId></dependency>","handlingStrategy":"validation","validationCode":"// before dev mode, verify each local dependency module has sources\nPath mod = Path.of(\"../my-lib\");\nboolean hasSources = Files.isDirectory(mod.resolve(\"src/main/java\"))\n        || Files.isDirectory(mod.resolve(\"src/main/resources\"));\nif (!hasSources) throw new IllegalStateException(\"Module has no sources: \" + mod);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not declare empty aggregator/POM modules as dependencies of the application.","Give each dependency module standard src/main/java or src/main/resources layout.","Build the full reactor (mvn install) before dev mode.","Review custom sourceDirectory configuration in dependency modules."],"tags":["maven","dev-mode","workspace","quarkus"],"backgroundTag":"missing-sources","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"}