{"record":{"id":"8b375d83c48561f2","repo":"quarkusio/quarkus","slug":"failed-to-load-recipes-in-artifact-gav","errorCode":null,"errorMessage":"Failed to load recipes in artifact: ${gav}","messagePattern":"Failed to load recipes in artifact: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/update/rewrite/QuarkusUpdatesRepository.java","lineNumber":121,"sourceCode":"                                    + \" and \" + pluginVersion);\n                }\n                if (log.isDebugEnabled()) {\n                    log.debug(String.format(\n                            \"=> %d specific recipe\" + (recipes.size() != 1 ? \"s\" : \"\")\n                                    + \" found (compatible with OpenRewrite %s plugin version: %s)\",\n                            recipes.size(),\n                            buildTool,\n                            propRewritePluginVersion));\n                } else {\n                    log.info(String.format(\n                            \"=> %s specific recipe\" + (recipes.size() != 1 ? \"s\" : \"\") + \" found\",\n                            MessageFormatter.green(String.valueOf(recipes.size()))));\n                }\n\n            } catch (BootstrapMavenException e) {\n                throw new RuntimeException(\"Failed to resolve artifact: \" + gav, e);\n            } catch (IOException e) {\n                throw new RuntimeException(\"Failed to load recipes in artifact: \" + gav, e);\n            }\n        }\n\n        return new FetchResult(String.join(\",\", artifacts),\n                recipes, propRewritePluginVersion);\n    }\n\n    private static String getPropRewritePluginVersion(Properties props, BuildTool buildTool) {\n        switch (buildTool) {\n            case MAVEN:\n                return Optional.ofNullable(props.getProperty(PROP_REWRITE_MAVEN_PLUGIN_VERSION))\n                        .orElse(DEFAULT_MAVEN_REWRITE_PLUGIN_VERSION);\n            case GRADLE:\n            case GRADLE_KOTLIN_DSL:\n                return Optional.ofNullable(props.getProperty(PROP_REWRITE_GRADLE_PLUGIN_VERSION))\n                        .orElse(DEFAULT_GRADLE_REWRITE_PLUGIN_VERSION);\n            default:\n                throw new IllegalStateException(\"This build tool does not support update \" + buildTool);","sourceCodeStart":103,"sourceCodeEnd":139,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/update/rewrite/QuarkusUpdatesRepository.java#L103-L139","documentation":"After successfully resolving the recipe artifact, fetchRecipes() reads its recipe YAML files. If an IOException occurs while loading the recipes from the resolved artifact, it is wrapped in RuntimeException(\"Failed to load recipes in artifact: <gav>\"). The artifact was found, but its contents could not be read/parsed as an archive or files.","triggerScenarios":"fetchRecipes resolves the artifact GAV successfully but Files/JAR reading throws IOException — e.g. corrupt JAR in the local repository, unreadable file permissions, or an I/O failure while opening the artifact's recipe resources.","commonSituations":"Interrupted download left a truncated/corrupt JAR in ~/.m2/repository; disk or permission problems on the local Maven repo; antivirus locking the file; artifact published without the expected recipe resources structure.","solutions":["Delete the artifact directory from ~/.m2/repository and let Maven re-download it.","Check filesystem permissions and free disk space for the local Maven repository.","Verify the artifact JAR is valid (`jar tf <file>`) and re-publish if it was built without recipe resources.","Temporarily disable antivirus/file locking on the repo path and retry."],"exampleFix":"// shell before: corrupt cached artifact\nrm -rf ~/.m2/repository/io/quarkus/quarkus-update-recipes/3.15.0\n// then retry\n./mvnw ... quarkus:update  # artifact re-downloaded cleanly","handlingStrategy":"try-catch","validationCode":"// Validate the cached artifact is a readable JAR before running:\n// jar tf ~/.m2/repository/io/quarkus/quarkus-update-recipes/<v>/*.jar > /dev/null","typeGuard":null,"tryCatchPattern":"try {\n    FetchResult r = repo.fetchRecipes(gav, buildTool, ...);\n} catch (RuntimeException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Failed to load recipes\")) {\n        log.error(\"Artifact resolved but unreadable; purge ~/.m2 cache for it and retry.\", e);\n    }\n}","preventionTips":["Purge cached artifacts after interrupted downloads or builds.","Keep free disk space and sane permissions on ~/.m2/repository.","Verify published JARs contain the expected recipe resources before releasing.","Avoid concurrent Maven processes writing to the same local repository."],"tags":["io","maven","artifact-resolution"],"backgroundTag":"artifact-read-failed","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"}