{"record":{"id":"5843813ea8ba7b2a","repo":"quarkusio/quarkus","slug":"unable-to-add-extra-files-in","errorCode":null,"errorMessage":"Unable to add extra files in ","messagePattern":"Unable to add extra files in ","errorType":"console","errorClass":"UncheckedIOException","httpStatus":null,"severity":"error","filePath":"extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java","lineNumber":912,"sourceCode":"        }\n\n        FileEntriesLayer extraFilesLayer;\n        try {\n            extraFilesLayer = ContainerBuilderHelper.extraDirectoryLayerConfiguration(\n                    jibFilesRoot,\n                    AbsoluteUnixPath.get(\"/\"),\n                    Collections.emptyMap(),\n                    (localPath, ignored2) -> {\n                        try {\n                            return Files.getLastModifiedTime(localPath).toInstant();\n                        } catch (IOException e) {\n                            throw new UncheckedIOException(e);\n                        }\n                    });\n            jibContainerBuilder.addFileEntriesLayer(\n                    extraFilesLayer);\n        } catch (IOException e) {\n            throw new UncheckedIOException(\n                    \"Unable to add extra files in '\" + jibFilesRoot.toAbsolutePath().toString() + \"' to the container\", e);\n        }\n    }\n\n    private Map<String, String> allLabels(ContainerImageJibConfig jibConfig, ContainerImageConfig containerImageConfig,\n            List<ContainerImageLabelBuildItem> containerImageLabels) {\n        if (containerImageLabels.isEmpty() && containerImageConfig.labels().isEmpty()) {\n            return Collections.emptyMap();\n        }\n\n        final Map<String, String> allLabels = new HashMap<>(containerImageConfig.labels());\n        for (ContainerImageLabelBuildItem containerImageLabel : containerImageLabels) {\n            // we want the user supplied labels to take precedence so the user can override labels generated from other extensions if desired\n            allLabels.putIfAbsent(containerImageLabel.getName(), containerImageLabel.getValue());\n        }\n        return allLabels;\n    }\n","sourceCodeStart":894,"sourceCodeEnd":930,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java#L894-L930","documentation":"When quarkus.jib.jvm-extra-files (or native extra files) points at a directory copied verbatim into the container, JibProcessor walks jibFilesRoot and builds an extra files layer. If any I/O on that tree fails (missing root, unreadable file, symlink issues), the IOException is wrapped as UncheckedIOException(\"Unable to add extra files in '<jibFilesRoot>' to the container\").","triggerScenarios":"quarkus.jib.jvm-extra-files (or quarkus.jib.native-extra-files) is set to a path that does not exist, is not readable, or contains files that disappear/fail during the copy walk.","commonSituations":"Typo in the extra-files path, path relative to a different working directory than expected (config resolves against project root vs module dir), CI copying config between projects where the extra-files directory was not committed, permission-restricted files in the directory.","solutions":["Verify the configured extra-files path exists relative to the module root (ls the exact absolute path printed in the message)","Use an absolute path or fix the relative path in application.properties","Check read permissions on the directory tree for the user running the build","Remove symlinks/broken entries from the extra-files directory"],"exampleFix":"// before: application.properties\nquarkus.jib.jvm-extra-files=./extra-files\n// after: correct, existing path relative to the module\nquarkus.jib.jvm-extra-files=src/main/jib\n# (src/main/jib is the conventional location and must exist)","handlingStrategy":"validation","validationCode":"// before enabling extra files\nString extra = System.getProperty(\"quarkus.jib.jvm-extra-files\", \"\");\nif (!extra.isEmpty() && !java.nio.file.Files.isDirectory(java.nio.file.Path.of(extra))) {\n    throw new IllegalStateException(\"quarkus.jib.jvm-extra-files does not exist: \" + extra);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Resolve extra-files paths relative to the module root and verify with an absolute path locally","Commit the extra-files directory to version control","Use the conventional src/main/jib location","Keep the tree free of symlinks and unreadable files"],"tags":["jib","container-image","filesystem","configuration"],"backgroundTag":"invalid-config-path","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}