{"record":{"id":"e4e203f8264ad4bd","repo":"quarkusio/quarkus","slug":"archiveroot-does-not-point-to-the-application-o","errorCode":null,"errorMessage":"${archiveRoot} does not point to the application output directory","messagePattern":"(.+?) does not point to the application output directory","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/builditem/ArchiveRootBuildItem.java","lineNumber":110,"sourceCode":"    }\n\n    private final Path archiveRoot;\n    private final Collection<Path> excludedFromIndexing;\n    private final PathCollection rootDirs;\n    private final PathCollection paths;\n\n    /**\n     * Constructs an {@link ArchiveRootBuildItem} with a single application classes directory.\n     *\n     * @param appClassesDir the path to the application classes directory\n     */\n    public ArchiveRootBuildItem(Path appClassesDir) {\n        this(appClassesDir, appClassesDir, Collections.emptySet());\n    }\n\n    private ArchiveRootBuildItem(Path archiveLocation, Path archiveRoot, Collection<Path> excludedFromIndexing) {\n        if (!Files.isDirectory(archiveRoot)) {\n            throw new IllegalArgumentException(archiveRoot + \" does not point to the application output directory\");\n        }\n        this.rootDirs = PathList.of(archiveRoot);\n        this.paths = PathList.of(archiveLocation);\n        this.archiveRoot = archiveRoot;\n        this.excludedFromIndexing = excludedFromIndexing;\n    }\n\n    private ArchiveRootBuildItem(Builder builder, QuarkusBuildCloseablesBuildItem buildCloseables) throws IOException {\n        this.excludedFromIndexing = builder.excludedFromIndexing;\n        if (!builder.archiveRoots.isEmpty()) {\n            final PathList.Builder rootDirs = PathList.builder();\n            final PathList.Builder paths = PathList.builder();\n            for (Path root : builder.archiveRoots) {\n                paths.add(root);\n                if (Files.isDirectory(root)) {\n                    rootDirs.add(root);\n                } else {\n                    final FileSystem fs = buildCloseables.add(ZipUtils.newFileSystem(root));","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/builditem/ArchiveRootBuildItem.java#L92-L128","documentation":"ArchiveRootBuildItem represents the directory that is the application's archive root (its compiled classes output). The constructor validates that the given path exists and is a directory; passing a missing or non-directory path throws IllegalArgumentException.","triggerScenarios":"Constructing ArchiveRootBuildItem (directly or via the single-Path convenience constructor) with a Path that does not exist, is a file, or points at a JAR rather than an exploded classes directory.","commonSituations":"Running augmentation before compilation (target/classes missing); misconfigured maven/gradle output directory; passing a packaged JAR path where an exploded dir is required; custom tooling building the augmentor manually.","solutions":["Ensure the application classes directory exists (run compile before augmentation) and pass that path (e.g. target/classes).","Verify the build tool's output directory configuration (maven-compiler-plugin outputDirectory / Gradle sourceSets.main.output).","Check the path for typos and that it is not a JAR/file; use Files.isDirectory(path) as a precondition in custom tooling."],"exampleFix":"// before\nnew ArchiveRootBuildItem(Path.of(\"target/myapp.jar\"));\n// after\nPath classes = Path.of(\"target/classes\");\nif (Files.isDirectory(classes)) {\n    new ArchiveRootBuildItem(classes);\n}","handlingStrategy":"validation","validationCode":"Path classes = Path.of(\"target/classes\");\nif (!Files.isDirectory(classes)) {\n    throw new IllegalStateException(\"Compile the application first; missing \" + classes);\n}","typeGuard":"static boolean isValidArchiveRoot(Path p) {\n    return p != null && Files.isDirectory(p);\n}","tryCatchPattern":null,"preventionTips":["Always compile before invoking augmentation in custom tooling.","Verify the classes output directory in the build configuration.","Never pass a JAR/file path where an exploded directory is expected."],"tags":["filesystem","build","path-validation","quarkus"],"backgroundTag":"invalid-application-output-directory","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"}