{"record":{"id":"e158fe75ab9a2037","repo":"quarkusio/quarkus","slug":"failed-to-resolve-the-latest-version-of-groupid","errorCode":null,"errorMessage":"Failed to resolve the latest version of ${groupId}:${artifactId}:${classifier}:${type}:${versionRange}","messagePattern":"Failed to resolve the latest version of (.+?):(.+?):(.+?):(.+?):(.+?)","errorType":"exception","errorClass":"RegistryResolutionException","httpStatus":null,"severity":"error","filePath":"independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenPlatformExtensionsResolver.java","lineNumber":95,"sourceCode":"        }\n        try {\n            return ExtensionCatalog.mutableFromFile(jsonPath);\n        } catch (IOException e) {\n            throw new RegistryResolutionException(\"Failed to parse Quarkus extension catalog \" + jsonPath, e);\n        }\n    }\n\n    private String resolveLatestBomVersion(ArtifactCoords bom, String versionRange)\n            throws RegistryResolutionException {\n        final Artifact bomArtifact = new DefaultArtifact(bom.getGroupId(),\n                PlatformArtifacts.ensureBomArtifactId(bom.getArtifactId()),\n                \"\", \"pom\", bom.getVersion());\n        log.debug(\"Resolving the latest version of %s:%s:%s:%s in the range %s\", bom.getGroupId(), bom.getArtifactId(),\n                bom.getClassifier(), bom.getType(), versionRange);\n        try {\n            return artifactResolver.getLatestVersionFromRange(bomArtifact, versionRange);\n        } catch (Exception e) {\n            throw new RegistryResolutionException(\"Failed to resolve the latest version of \" + bomArtifact.getGroupId()\n                    + \":\" + bom.getArtifactId() + \":\" + bom.getClassifier() + \":\" + bom.getType() + \":\" + versionRange, e);\n        }\n    }\n\n    private static boolean isVersionRange(String versionStr) {\n        if (versionStr == null || versionStr.isEmpty()) {\n            return false;\n        }\n        char c = versionStr.charAt(0);\n        if (c == '[' || c == '(') {\n            return true;\n        }\n        c = versionStr.charAt(versionStr.length() - 1);\n        if (c == ']' || c == ')') {\n            return true;\n        }\n        return versionStr.indexOf(',') >= 0;\n    }","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/tools/registry-client/src/main/java/io/quarkus/registry/client/maven/MavenPlatformExtensionsResolver.java#L77-L113","documentation":"Thrown by MavenPlatformExtensionsResolver.resolveLatestBomVersion when the underlying Maven artifact resolver cannot determine the latest version of a platform BOM artifact within the requested version range. Any exception from artifactResolver.getLatestVersionFromRange (network failure, missing metadata, unparseable range) is wrapped into this RegistryResolutionException with the full GAV:classifier:type plus the version range in the message.","triggerScenarios":"Calling resolvePlatformExtensions with a BOM whose version is a version range (isVersionRange check) and artifactResolver.getLatestVersionFromRange throws — e.g. the remote repository is unreachable, maven-metadata.xml is missing or malformed for the BOM, or no version in the range satisfies it.","commonSituations":"Offline/behind-firewall CI environments that cannot reach Maven Central or the Quarkus registry; a custom version range in quarkus.platform.version that matches no published versions (typo, wrong major range); corporate Nexus/Artifactory not proxying the quarkus platform group; a removed or relocated BOM version.","solutions":["Check network access to the configured Maven repository (curl the repository URL / maven-metadata.xml) and retry.","Replace the version range with a concrete, published platform version (e.g. 3.2.5.Final instead of [3.0,4.0)) in your configuration.","If using a corporate repository manager, verify it proxies and caches the Quarkus platform group metadata correctly.","Run Maven with -e/-X or debug logging to see the wrapped cause and the exact repository that failed.","Pin the Quarkus BOM version in dependencyManagement to avoid range resolution entirely."],"exampleFix":"// before: version range that fails to resolve\n<quarkus.platform.version>[999.0,)</quarkus.platform.version>\n// after: pinned version known to exist\n<quarkus.platform.version>3.2.5.Final</quarkus.platform.version>","handlingStrategy":"retry","validationCode":"String range = quarkusPlatformVersion;\n// pre-check: only pass ranges you know are satisfiable; verify metadata locally\nif (range.startsWith(\"[\") || range.startsWith(\"(\")) {\n    URL meta = URI.create(repoUrl + \"/io/quarkus/platform/quarkus-bom/maven-metadata.xml\").toURL();\n    try (InputStream in = meta.openStream()) { // throws if repo unreachable\n        if (in.read() == -1) throw new IllegalStateException(\"Empty maven-metadata.xml\");\n    }\n} else {\n    // concrete version: check it is published\n    URL pom = URI.create(repoUrl + \"/io/quarkus/platform/quarkus-bom/\" + range + \"/quarkus-bom-\" + range + \".pom\").toURL();\n    ((HttpURLConnection) pom.openConnection()).setConnectTimeout(5000);\n}","typeGuard":"static boolean isSaneVersionRange(String v) {\n    return v != null && !v.isEmpty()\n        && (v.matches(\"\\\\d+\\\\.\\\\d+\\\\.\\\\d+.*\")          // concrete version\n            || v.matches(\"[\\\\[(].*[\\\\])]\"));          // well-formed range","tryCatchPattern":"try {\n    String latest = resolver.resolvePlatformExtensions(bom, versionRange).getQuarkusCoreVersion();\n} catch (RegistryResolutionException e) {\n    if (e.getMessage().startsWith(\"Failed to resolve the latest version of\")) {\n        // network/metadata issue: exponential backoff retry, then fall back to pinned version\n        latest = retryWithBackoff(() -> resolver.resolvePlatformExtensions(bom, versionRange), 3)\n                     .getQuarkusCoreVersion();\n    } else throw e;\n}","preventionTips":["Pin concrete Quarkus BOM versions instead of open-ended version ranges.","Ensure CI has network access (or an internal mirror) to Maven Central / Quarkus registry.","Validate maven-metadata.xml availability on corporate proxies for the Quarkus platform group.","Wrap resolution with bounded retries for transient network failures.","Keep the registry-client and platform versions aligned."],"tags":["maven","version-resolution","network","quarkus-platform"],"backgroundTag":"artifact-resolution-failed","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"}