quarkusio/quarkus · error · GradleException
No platforms detected in the project
Error message
No platforms detected in the project
What it means
importedPlatforms() first collects the project's imported BOM dependencies via listProjectBoms. If none are found, it throws GradleException("No platforms detected in the project"). It means the project does not import any Quarkus platform BOM, which the platform task requires.
Source
Thrown at devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusPlatformTask.java:83
}
protected ExtensionCatalogResolver getExtensionCatalogResolver(MessageWriter log) {
if (catalogResolver == null) {
try {
catalogResolver = QuarkusProjectHelper.isRegistryClientEnabled()
? QuarkusProjectHelper.getCatalogResolver(log)
: ExtensionCatalogResolver.empty();
} catch (RegistryResolutionException e) {
throw new RuntimeException("Failed to initialize Quarkus extension catalog resolver", e);
}
}
return catalogResolver;
}
protected List<ArtifactCoords> importedPlatforms() {
final List<Dependency> bomDeps = listProjectBoms(project);
if (bomDeps.isEmpty()) {
throw new GradleException("No platforms detected in the project");
}
final Configuration boms = project.getConfigurations()
.detachedConfiguration(bomDeps.toArray(new org.gradle.api.artifacts.Dependency[0]));
final Set<ArtifactKey> processedKeys = new HashSet<>(1);
List<ArtifactCoords> platforms = new ArrayList<>();
boms.getResolutionStrategy().eachDependency(d -> {
if (!d.getTarget().getName().endsWith(BootstrapConstants.PLATFORM_DESCRIPTOR_ARTIFACT_ID_SUFFIX)
|| !processedKeys.add(ArtifactKey.ga(d.getTarget().getGroup(), d.getTarget().getName()))) {
return;
}
final ArtifactCoords platform = ArtifactCoords.of(d.getTarget().getGroup(), d.getTarget().getName(),
d.getTarget().getVersion(), "json", d.getTarget().getVersion());
platforms.add(platform);
});
boms.getResolvedConfiguration();
View on GitHub (pinned to e1c734241f)
Solutions
- Import a Quarkus platform BOM, e.g. implementation(enforcedPlatform("io.quarkus.platform:quarkus-bom:3.x.x")).
- If the project should not need platform tasks, do not invoke quarkus platform Gradle tasks in this module.
- Re-generate the project with the Quarkus project generator so the platform BOM is present.
Example fix
// before
dependencies {
implementation "io.quarkus:quarkus-rest"
}
// after
dependencies {
implementation enforcedPlatform("io.quarkus.platform:quarkus-bom:3.15.1")
implementation "io.quarkus:quarkus-rest"
} Defensive patterns
Strategy: validation
Validate before calling
// verify a Quarkus platform BOM exists before invoking platform tasks
def hasBom = configurations.implementation.allDependencies.any { it.group == 'io.quarkus.platform' }
assert hasBom : 'Import io.quarkus.platform:quarkus-bom before running Quarkus platform tasks' Try / catch
try { tasks.named('quarkusListExtensions').get().listExtensions() } catch (GradleException e) { if (e.message == 'No platforms detected in the project') { /* add enforcedPlatform(io.quarkus.platform:quarkus-bom) */ } } Prevention
- Always generate Quarkus projects via code.quarkus.io or the Gradle plugin so the BOM is included.
- Never remove the enforcedPlatform(io.quarkus.platform:quarkus-bom) line from build.gradle.
- Run platform tasks only in modules that declare the BOM.
When it happens
Trigger: Calling platform tasks (listExtensions, addExtension, removeExtension, updateProject) from a Gradle project whose build file has no Quarkus platform BOM (e.g. io.quarkus.platform:quarkus-bom) in its dependencies/enforcedPlatform block.
Common situations: New projects created without the Quarkus Gradle plugin setup; projects managing Quarkus versions manually without a BOM; running the task in a module that inherits no BOM; typo in the platform BOM coordinates.
Related errors
- No Quarkus platforms found in the project
- Failed to determine the Quarkus core version for the project
- Failed to import platform properties
- Failed to add platform properties + artifact
- Failed to initialize Quarkus extension catalog resolver
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/c907da8c6c3bd670.
Report an issue: GitHub.