{"record":{"id":"d42fe18c90cda98f","repo":"quarkusio/quarkus","slug":"failed-to-resolve-deployment-classpath","errorCode":null,"errorMessage":"Failed to resolve deployment classpath","messagePattern":"Failed to resolve deployment classpath","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/actions/BeforeTestAction.java","lineNumber":100,"sourceCode":"            final File outputDirectoryAsFile = getLastFile(mainSourceSetClassesDir);\n\n            Path projectDirPath = projectDir.toPath();\n\n            // Identify the folder containing the sources associated with this test task\n            String fileList = task.getTestClassesDirs().getFiles().stream()\n                    .filter(File::exists)\n                    .distinct()\n                    .map(testSrcDir -> String.format(\"%s:%s\",\n                            projectDirPath.relativize(testSrcDir.toPath()),\n                            projectDirPath.relativize(outputDirectoryAsFile.toPath())))\n                    .collect(Collectors.joining(\",\"));\n            task.environment(BootstrapConstants.TEST_TO_MAIN_MAPPINGS, fileList);\n            task.getLogger().debug(\"test dir mapping - {}\", fileList);\n\n            String nativeRunner = nativeRunnerPath.get().toPath().toAbsolutePath().toString();\n            props.put(\"native.image.path\", nativeRunner);\n        } catch (Exception e) {\n            throw new IllegalStateException(\"Failed to resolve deployment classpath\", e);\n        }\n    }\n\n    private EffectiveConfigProvider effectiveProvider() {\n        return new EffectiveConfigProvider(\n                extensionView.getIgnoredEntries(),\n                extensionView.getMainResources(),\n                extensionView.getForcedProperties(),\n                extensionView.getProjectProperties(),\n                extensionView.getQuarkusBuildProperties(),\n                manifestAttributes,\n                manifestSections,\n                extensionView.getNativeBuild(),\n                extensionView.getQuarkusProfileSystemVariable(),\n                extensionView.getQuarkusProfileEnvVariable());\n    }\n}\n","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/actions/BeforeTestAction.java#L82-L118","documentation":"BeforeTestAction.execute wraps any failure while preparing the deployment classpath (application model resolution, extension config, native runner path, test-to-main mappings) into IllegalStateException with message 'Failed to resolve deployment classpath'.","triggerScenarios":"Running Quarkus tests via the Gradle test action when building the ApplicationDeploymentClasspathBuilder results (dependency resolution failure, invalid application model, missing config, or native runner path unavailable in native-test mode).","commonSituations":"Unresolvable deployment dependencies (repositories/offline), broken quarkus plugin extension config, version mismatch between Gradle plugin and Quarkus core, missing native-image binary when running native tests.","solutions":["Read the wrapped cause (e.getCause()) for the underlying resolution/model failure","Run ./gradlew build --refresh-dependencies and confirm repositories are reachable; verify plugin and Quarkus platform versions match","For native mode, verify GraalVM native-image is installed and quarkus.native.* settings are correct"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before tests: ./gradlew dependencies --configuration <deploymentClasspath> and confirm resolution succeeds\ntasks.test { dependsOn(\"dependencies\") } // fail fast on unresolvable deps","typeGuard":null,"tryCatchPattern":"try { /* run quarkus tests */ } catch (IllegalStateException e) { if (\"Failed to resolve deployment classpath\".equals(e.getMessage())) { log.error(\"underlying: \", e.getCause()); } }","preventionTips":["Ensure deployment dependencies resolve (repositories/proxy/offline)","Keep Quarkus Gradle plugin and platform versions aligned","Install native-image for native test mode and check quarkus.native.* config","Inspect the wrapped cause first — the message is generic"],"tags":["gradle","deployment-classpath","test-setup"],"backgroundTag":"dependency-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"}