quarkusio/quarkus · error · RuntimeException
Failed to add platform properties + artifact
Error message
Failed to add platform properties + artifact
What it means
Thrown by QuarkusApplicationModelTask.resolvePlatformImports() when a platform artifact ending in '.properties' cannot be registered as platform properties in the application model (AppModelResolverException wrapped in RuntimeException). It indicates a corrupted or unreadable platform descriptor artifact in the local/remote repository.
Source
Thrown at devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusApplicationModelTask.java:587
* Internal since we track defined dependencies via {@link QuarkusApplicationModelTask#getOriginalClasspath}
*/
@Internal
public abstract Property<ArtifactCollection> getResolvedArtifactCollection();
private PlatformImportsImpl resolvePlatformImports() {
final PlatformImportsImpl result = new PlatformImportsImpl();
for (var artifact : getResolvedArtifactCollection().get().getArtifacts()) {
var compId = ((ModuleComponentArtifactIdentifier) artifact.getId()).getComponentIdentifier();
final String artifactId = artifact.getFile().getName();
if (artifactId.endsWith(".json")) {
result.addPlatformDescriptor(compId.getGroup(), compId.getModuleIdentifier().getName(), compId.getVersion(),
"json", compId.getVersion());
} else if (artifactId.endsWith(".properties")) {
try {
result.addPlatformProperties(compId.getGroup(), compId.getModuleIdentifier().getName(),
ArtifactCoords.DEFAULT_CLASSIFIER, "json", compId.getVersion(), artifact.getFile().toPath());
} catch (AppModelResolverException e) {
throw new RuntimeException("Failed to add platform properties " + artifact, e);
}
}
}
return result;
}
public void configureFrom(Configuration configuration) {
getResolvedArtifactCollection().set(configuration.getIncoming().getArtifacts());
}
}
/**
* See example https://docs.gradle.org/current/samples/sample_tasks_with_dependency_resolution_result_inputs.html,
* to better understand how this works.
*/
public static abstract class QuarkusResolvedClasspath {
/**View on GitHub (pinned to e1c734241f)
Solutions
- Delete the offending artifact from the Gradle cache (~/.gradle/caches/modules-2) and re-run to re-download
- Run with --refresh-dependencies to force re-resolution of platform artifacts
- Check disk permissions and available space; verify platform BOM versions align with the Quarkus version
Example fix
// before: corrupted artifact rm -rf ~/.gradle/caches/modules-2/files-2.1/io.quarkus.platform/ ./gradlew quarkusBuild --refresh-dependencies
Defensive patterns
Strategy: retry
Validate before calling
// verify the platform properties artifact is readable before building
val f = File(path)
if (!f.isFile || f.length() == 0L) throw IllegalStateException("Corrupt artifact: $f") Try / catch
try { resolvePlatformImports() } catch (e: RuntimeException) {
if (e.message?.startsWith("Failed to add platform properties") == true) {
// purge the artifact from ~/.gradle/caches and retry with --refresh-dependencies
} else throw e
} Prevention
- Avoid interrupted downloads (use stable network/repo mirrors in CI)
- Clean Gradle caches periodically
- Keep Quarkus platform BOM versions aligned with the Quarkus version
When it happens
Trigger: Resolving the Quarkus platform (BOM) during quarkusApplicationModel computation where a quarkus-*-properties artifact's file exists but cannot be added (invalid path, unreadable/corrupt artifact file in ~/.m2 or Gradle cache).
Common situations: Corrupted Gradle/Maven cache after interrupted downloads; mismatched platform versions where a properties artifact is stale; running behind proxies leaving partially downloaded artifacts.
Related errors
- Failed to process + artifactPath
- Failed to initialize Quarkus extension catalog resolver
- No platforms detected in the project
- No Quarkus platforms found in the project
- Failed to determine the Quarkus core version for the project
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/1b34ca6d682895d9.
Report an issue: GitHub.