{"record":{"id":"03f35fa08bfb298f","repo":"quarkusio/quarkus","slug":"multiple-extensions-request-different-versions-of","errorCode":null,"errorMessage":"Multiple extensions request different versions of Elasticsearch for Dev Services.","messagePattern":"Multiple extensions request different versions of Elasticsearch for Dev Services\\.","errorType":"exception","errorClass":"BuildException","httpStatus":null,"severity":"error","filePath":"extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/DevServicesElasticsearchProcessor.java","lineNumber":310,"sourceCode":"        }\n        return propertiesToSet;\n    }\n\n    private static String displayProperties(Set<String> hostsConfigProperties) {\n        return String.join(\" and \", hostsConfigProperties);\n    }\n\n    private static DevservicesElasticsearchBuildItemsConfiguration aggregateBuildItems(\n            List<DevservicesElasticsearchBuildItem> devservicesElasticsearchBuildItems) throws BuildException {\n        Set<String> hostsConfigProperties = new HashSet<>(devservicesElasticsearchBuildItems.size());\n        String version = null;\n        Distribution distribution = null;\n\n        for (DevservicesElasticsearchBuildItem buildItem : devservicesElasticsearchBuildItems) {\n            if (version == null) {\n                version = buildItem.getVersion();\n            } else if (buildItem.getVersion() != null && !version.equals(buildItem.getVersion())) {\n                throw new BuildException(\n                        \"Multiple extensions request different versions of Elasticsearch for Dev Services.\",\n                        Collections.emptyList());\n            }\n\n            if (distribution == null) {\n                distribution = buildItem.getDistribution();\n            } else if (buildItem.getDistribution() != null && !distribution.equals(buildItem.getDistribution())) {\n                throw new BuildException(\n                        \"Multiple extensions request different distributions of Elasticsearch for Dev Services.\",\n                        Collections.emptyList());\n            }\n\n            hostsConfigProperties.add(buildItem.getHostsConfigProperty());\n        }\n\n        return new DevservicesElasticsearchBuildItemsConfiguration(hostsConfigProperties, version, distribution);\n    }\n","sourceCodeStart":292,"sourceCodeEnd":328,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/elasticsearch-rest-client-common/deployment/src/main/java/io/quarkus/elasticsearch/restclient/common/deployment/DevServicesElasticsearchProcessor.java#L292-L328","documentation":"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.","triggerScenarios":"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.","commonSituations":"Mixing extensions built against different Elasticsearch releases; a custom extension hard-coding a version while another uses the default.","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"],"exampleFix":"// before: ext A requests 8.13.4, ext B requests 7.17.9\n// after: update ext B (or set its config) to request 8.13.4 so both build items agree","handlingStrategy":"validation","validationCode":"// verify only one version is requested across extensions\nmvn dependency:tree | grep -i elasticsearch\n// align extension versions or pin dev-services version in application.properties","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["devservices","elasticsearch","build-time","version-mismatch"],"backgroundTag":"dependency-version-mismatch","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}