{"record":{"id":"f3afd3231af9d283","repo":"quarkusio/quarkus","slug":"failed-to-scan-extensions-directory-extroot","errorCode":null,"errorMessage":"Failed to scan extensions directory: ${extRoot}","messagePattern":"Failed to scan extensions directory: (.+?)","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/AggregateSkillsMojo.java","lineNumber":132,"sourceCode":"                            entries.add(new SkillEntry(file, runtimeYaml));\n                        } else {\n                            getLog().debug(\"No runtime quarkus-extension.yaml found for: \" + file);\n                        }\n                    }\n                    return FileVisitResult.CONTINUE;\n                }\n\n                @Override\n                public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {\n                    // Skip target directories for performance\n                    if (dir.getFileName().toString().equals(\"target\")) {\n                        return FileVisitResult.SKIP_SUBTREE;\n                    }\n                    return FileVisitResult.CONTINUE;\n                }\n            });\n        } catch (IOException e) {\n            throw new MojoExecutionException(\"Failed to scan extensions directory: \" + extRoot, e);\n        }\n\n        return entries;\n    }\n\n    /**\n     * Checks that the file is under a {@code deployment/src/main/resources/META-INF/} path.\n     */\n    private boolean isDeploymentResourcePath(Path file) {\n        // Walk up from quarkus-skill.md: META-INF / resources / main / src / deployment\n        Path current = file.getParent(); // META-INF\n        if (current == null)\n            return false;\n        current = current.getParent(); // resources\n        if (current == null || !current.getFileName().toString().equals(\"resources\"))\n            return false;\n        current = current.getParent(); // main\n        if (current == null || !current.getFileName().toString().equals(\"main\"))","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/extension-maven-plugin/src/main/java/io/quarkus/maven/AggregateSkillsMojo.java#L114-L150","documentation":"AggregateSkillsMojo.discoverSkillFiles walks the extensions directory tree with a Files.walkFileTree visitor to collect skill files, aggregating extension documentation. If the walk throws an IOException, it is wrapped in a MojoExecutionException naming the extensions root directory that could not be scanned.","triggerScenarios":"Running the aggregate-skills goal when Files.walkFileTree on the configured extensions root throws IOException — e.g. the directory does not exist, permission is denied, or an I/O error occurs mid-traversal.","commonSituations":"Wrong/quarkus.paths.exclusions or extensionsDirectory config pointing at a non-existent path; running the mojo outside a checkout with the expected extensions/ layout; restrictive file permissions in CI containers; broken symlinks causing traversal I/O errors.","solutions":["Verify the extensions directory path (extRoot) exists and is readable from the module where the mojo runs","Fix file system permissions (chmod/chown) or run the build as a user with read access","Check for broken symlinks or inaccessible subdirectories under the extensions root","Run with -X to see the wrapped IOException cause for the exact failing path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"File extRoot = new File(configuredExtensionsDir);\nif (!extRoot.isDirectory() || !extRoot.canRead()) {\n  throw new IllegalStateException(\"extensions directory missing/unreadable: \" + extRoot.getAbsolutePath());\n}","typeGuard":null,"tryCatchPattern":"try {\n  invoker.executeMaven(\"aggregate-skills\");\n} catch (MojoExecutionException e) {\n  if (e.getCause() instanceof IOException) { verifyExtensionsDirectory(); }\n  throw e;\n}","preventionTips":["Verify the extensionsDirectory parameter resolves before running aggregate-skills","Run the mojo from the correct module/checkout root","Check permissions of the extensions tree in CI images","Avoid symlinks into network mounts for the extensions directory"],"tags":["maven-plugin","io","filesystem","mojo-execution-exception"],"backgroundTag":"filesystem-scan-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}