quarkusio/quarkus · error · RuntimeException
Failed to load recipes in artifact: ${gav}
Error message
Failed to load recipes in artifact: ${gav} What it means
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.
Source
Thrown at independent-projects/tools/devtools-common/src/main/java/io/quarkus/devtools/project/update/rewrite/QuarkusUpdatesRepository.java:121
+ " and " + pluginVersion);
}
if (log.isDebugEnabled()) {
log.debug(String.format(
"=> %d specific recipe" + (recipes.size() != 1 ? "s" : "")
+ " found (compatible with OpenRewrite %s plugin version: %s)",
recipes.size(),
buildTool,
propRewritePluginVersion));
} else {
log.info(String.format(
"=> %s specific recipe" + (recipes.size() != 1 ? "s" : "") + " found",
MessageFormatter.green(String.valueOf(recipes.size()))));
}
} catch (BootstrapMavenException e) {
throw new RuntimeException("Failed to resolve artifact: " + gav, e);
} catch (IOException e) {
throw new RuntimeException("Failed to load recipes in artifact: " + gav, e);
}
}
return new FetchResult(String.join(",", artifacts),
recipes, propRewritePluginVersion);
}
private static String getPropRewritePluginVersion(Properties props, BuildTool buildTool) {
switch (buildTool) {
case MAVEN:
return Optional.ofNullable(props.getProperty(PROP_REWRITE_MAVEN_PLUGIN_VERSION))
.orElse(DEFAULT_MAVEN_REWRITE_PLUGIN_VERSION);
case GRADLE:
case GRADLE_KOTLIN_DSL:
return Optional.ofNullable(props.getProperty(PROP_REWRITE_GRADLE_PLUGIN_VERSION))
.orElse(DEFAULT_GRADLE_REWRITE_PLUGIN_VERSION);
default:
throw new IllegalStateException("This build tool does not support update " + buildTool);View on GitHub (pinned to e1c734241f)
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.
Example fix
// shell before: corrupt cached artifact rm -rf ~/.m2/repository/io/quarkus/quarkus-update-recipes/3.15.0 // then retry ./mvnw ... quarkus:update # artifact re-downloaded cleanly
Defensive patterns
Strategy: try-catch
Validate before calling
// Validate the cached artifact is a readable JAR before running: // jar tf ~/.m2/repository/io/quarkus/quarkus-update-recipes/<v>/*.jar > /dev/null
Try / catch
try {
FetchResult r = repo.fetchRecipes(gav, buildTool, ...);
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().startsWith("Failed to load recipes")) {
log.error("Artifact resolved but unreadable; purge ~/.m2 cache for it and retry.", e);
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Unable to render all config
- Unable to create directory: ${directory}
- Unable to collect the target directories
- Unable to read the template: ${template}
- Unable to close InputStream for template: ${template}
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/8b375d83c48561f2.
Report an issue: GitHub.