quarkusio/quarkus · error · BuildException
Multiple extensions request different versions of Elasticsea
Error message
Multiple extensions request different versions of Elasticsearch for Dev Services.
What it means
DevServicesElasticsearchProcessor.aggregateBuildItems() merges DevservicesElasticsearchBuildItem contributions from multiple extensions. If two extensions request different Elasticsearch versions for the shared Dev Services container, the versions cannot be reconciled and a BuildException is thrown.
Source
Thrown at extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/DevServicesElasticsearchProcessor.java:310
}
return propertiesToSet;
}
private static String displayProperties(Set<String> hostsConfigProperties) {
return String.join(" and ", hostsConfigProperties);
}
private static DevservicesElasticsearchBuildItemsConfiguration aggregateBuildItems(
List<DevservicesElasticsearchBuildItem> devservicesElasticsearchBuildItems) throws BuildException {
Set<String> hostsConfigProperties = new HashSet<>(devservicesElasticsearchBuildItems.size());
String version = null;
Distribution distribution = null;
for (DevservicesElasticsearchBuildItem buildItem : devservicesElasticsearchBuildItems) {
if (version == null) {
version = buildItem.getVersion();
} else if (buildItem.getVersion() != null && !version.equals(buildItem.getVersion())) {
throw new BuildException(
"Multiple extensions request different versions of Elasticsearch for Dev Services.",
Collections.emptyList());
}
if (distribution == null) {
distribution = buildItem.getDistribution();
} else if (buildItem.getDistribution() != null && !distribution.equals(buildItem.getDistribution())) {
throw new BuildException(
"Multiple extensions request different distributions of Elasticsearch for Dev Services.",
Collections.emptyList());
}
hostsConfigProperties.add(buildItem.getHostsConfigProperty());
}
return new DevservicesElasticsearchBuildItemsConfiguration(hostsConfigProperties, version, distribution);
}
View on GitHub (pinned to e1c734241f)
Solutions
- Align the versions requested by the contributing extensions (update one extension or its config)
- Remove/replace the extension requesting the outdated version
- Override the dev-services version so both contributions agree, or run Elasticsearch manually with devservices disabled
Example fix
// before: ext A requests 8.13.4, ext B requests 7.17.9 // after: update ext B (or set its config) to request 8.13.4 so both build items agree
Defensive patterns
Strategy: validation
Validate before calling
// verify only one version is requested across extensions mvn dependency:tree | grep -i elasticsearch // align extension versions or pin dev-services version in application.properties
Prevention
- Keep search-related extensions on versions from the same Quarkus release
- Run dev-mode startup in CI to catch build-item conflicts early
- Avoid hard-coding Elasticsearch versions in custom extensions
When it happens
Trigger: Two extensions in the app (e.g. quarkus-elasticsearch-rest-client and a third-party search extension) each produce a DevservicesElasticsearchBuildItem with a different version string.
Common situations: Mixing extensions built against different Elasticsearch releases; a custom extension hard-coding a version while another uses the default.
Related errors
- Multiple extensions request different distributions of Elast
- Could not find ${BUILDER_BASE_CLASS_NAME}#withJson(...); doe
- Wasn't able to determine the distribution of the search serv
- Unable to find file referenced in '${propertyKey}=${classpat
- Failed to open path tree with root %s
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/03f35fa08bfb298f.
Report an issue: GitHub.