{"record":{"id":"cd1b66ff697720f1","repo":"quarkusio/quarkus","slug":"failed-to-configure-taskpath-sourceset-sourc","errorCode":null,"errorMessage":"Failed to configure ${taskPath}: sourceSet ${sourceSet} has no output","messagePattern":"Failed to configure (.+?): sourceSet (.+?) has no output","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java","lineNumber":687,"sourceCode":"                .cachingRelevantProperties(quarkusExt.getCachingRelevantProperties().get()));\n        task.getJarEnabled().set(quarkusExt.packageConfig().jar().enabled());\n        task.getNativeEnabled().set(quarkusExt.nativeConfig().enabled());\n        task.getNativeSourcesOnly().set(quarkusExt.nativeConfig().sourcesOnly());\n        task.getRunnerSuffix().set(quarkusExt.packageConfig().computedRunnerSuffix());\n        task.getRunnerName().set(quarkusExt.packageConfig().outputName());\n        task.getOutputDirectory().set(quarkusExt.packageConfig().outputDirectory());\n        task.getJarType().set(quarkusExt.packageConfig().jar().type());\n        task.getManifestAttributes().set(quarkusExt.manifest().getAttributes());\n        task.getManifestSections().set(quarkusExt.manifest().getSections());\n    }\n\n    private static void configureGenerateCodeTask(QuarkusGenerateCode task,\n            TaskProvider<QuarkusApplicationModelTask> applicationModelTaskTaskProvider, String generateSourcesDir,\n            QuarkusPluginExtension quarkusExt) {\n        SourceSet generatedSources = getSourceSet(task.getProject(), generateSourcesDir);\n        Set<File> sourceSetOutput = generatedSources.getOutput().filter(f -> f.getName().equals(generateSourcesDir)).getFiles();\n        if (sourceSetOutput.isEmpty()) {\n            throw new GradleException(\"Failed to configure \" + task.getPath() + \": sourceSet \" + generateSourcesDir\n                    + \" has no output\");\n        }\n        task.getApplicationModel()\n                .set(applicationModelTaskTaskProvider.flatMap(QuarkusApplicationModelTask::getApplicationModel));\n        task.getGeneratedOutputDirectory().set(generatedSources.getJava().getClassesDirectory());\n        task.getCachingRelevantInput()\n                .set(quarkusExt.cachingRelevantProperties(quarkusExt.getCachingRelevantProperties().get()));\n        task.getManifestAttributes().set(quarkusExt.manifest().getAttributes());\n        task.getManifestSections().set(quarkusExt.manifest().getSections());\n    }\n\n    private void createSourceSets(Project project) {\n        SourceSetContainer sourceSets = project.getExtensions().getByType(SourceSetContainer.class);\n        sourceSets.create(INTEGRATION_TEST_SOURCE_SET_NAME);\n        sourceSets.create(NATIVE_TEST_SOURCE_SET_NAME);\n        sourceSets.create(QuarkusGenerateCode.QUARKUS_GENERATED_SOURCES);\n        sourceSets.create(QuarkusGenerateCode.QUARKUS_TEST_GENERATED_SOURCES);\n    }","sourceCodeStart":669,"sourceCodeEnd":705,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/QuarkusPlugin.java#L669-L705","documentation":"configureGenerateCodeTask throws GradleException when the source set backing Quarkus code generation produces no output directory matching the generate-sources directory name, so the generateCode task cannot be wired up.","triggerScenarios":"Registering/configuring a QuarkusGenerateCode task where getSourceSet(project, generateSourcesDir).getOutput() yields no File named generateSourcesDir — typically when the generated-sources source set was removed, renamed, or not created by the plugin extension.","commonSituations":"Custom build logic overriding or removing the 'quarkusGeneratedSources'-style source set; source set output reconfigured (custom classes dirs); applying the Quarkus plugin to a project with heavily customized source set layout.","solutions":["Do not remove or rename the generated-sources source set created by the Quarkus plugin","Verify sourceSets configuration keeps the generated sources output (sourceSets { main { ... } } customizations must not delete it)","Check quarkusExt settings / generateSourcesDir value matches the actual source set name"],"exampleFix":"// before (custom build logic)\nsourceSets.removeIf { it.name == \"quarkusGeneratedSources\" }\n// after\n// keep the source set; only append extra srcDirs\nsourceSets.matching { it.name == \"quarkusGeneratedSources\" }.configureEach {\n    java.srcDir(\"extra-generated\")\n}","handlingStrategy":"validation","validationCode":"Set<File> out = project.getExtensions().getByType(SourceSetContainer.class)\n    .getByName(\"quarkusGeneratedSources\").getOutput().getFiles();\nif (out.isEmpty()) { throw new IllegalStateException(\"generated sources source set has no output\"); }","typeGuard":null,"tryCatchPattern":"try { /* build */ } catch (GradleException e) { if (e.getMessage().contains(\"has no output\")) { /* restore source set config */ } }","preventionTips":["Don't remove/rename the plugin's generated-sources source set","Only extend source sets (srcDir), never replace output config","Verify generateSourcesDir name matches the actual source set"],"tags":["gradle","source-set","code-generation"],"backgroundTag":"missing-source-set-output","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"}