{"record":{"id":"78e3214d898eabcc","repo":"quarkusio/quarkus","slug":"the-project-has-no-output-yet-this-should-not-hap","errorCode":null,"errorMessage":"The project has no output yet, this should not happen as build should have been executed first. Does the project have any source files?","messagePattern":"The project has no output yet, this should not happen as build should have been executed first\\. Does the project have any source files\\?","errorType":"exception","errorClass":"GradleException","httpStatus":null,"severity":"error","filePath":"devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java","lineNumber":349,"sourceCode":"    @SuppressWarnings(\"unused\")\n    @Option(description = \"Sets test class or method name to be included (for continuous testing), '*' is supported.\", option = \"tests\")\n    public void setTests(List<String> tests) {\n        getTests().set(tests);\n    }\n\n    @Inject\n    public abstract ExecOperations getExecOperations();\n\n    @TaskAction\n    public void startDev() {\n        if (!sourcesExist()) {\n            throw new GradleException(\n                    \"At least one source directory (e.g. src/main/java, src/main/kotlin) should contain sources before starting Quarkus in dev mode when using Gradle. \"\n                            + \"Please initialize your project a bit further before restarting Quarkus in dev mode.\");\n        }\n\n        if (!classesExist()) {\n            throw new GradleException(\"The project has no output yet, \" +\n                    \"this should not happen as build should have been executed first. \" +\n                    \"Does the project have any source files?\");\n        }\n        AnalyticsService analyticsService = new AnalyticsService(FileLocationsImpl.INSTANCE,\n                new GradleMessageWriter(getLogger()));\n        analyticsService.buildAnalyticsUserInput((String prompt) -> {\n            System.out.print(prompt);\n            try (Scanner scanner = new Scanner(new FilterInputStream(System.in) {\n                @Override\n                public void close() throws IOException {\n                    //don't close System.in!\n                }\n            })) {\n                return scanner.nextLine();\n            } catch (Exception e) {\n                getLogger().debug(\"Failed to collect user input for analytics\", e);\n                return \"\";\n            }","sourceCodeStart":331,"sourceCodeEnd":367,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/QuarkusDev.java#L331-L367","documentation":"After confirming sources exist, startDev checks that compiled classes output exists (classesExist()). If the project has sources but no build output, dev mode aborts because quarkusDev expects the Gradle build/classes task to have run first. This normally means the build task did not execute or produced no output.","triggerScenarios":"classesExist() returns false despite sources existing — the classes output directory (build/classes/...) is missing or empty when the quarkusDev task action runs.","commonSituations":"A previous ./gradlew clean removed output and quarkusDev was invoked without rebuilding; compile task was skipped/failed silently via misconfiguration; the module's main source set output configured to a non-standard location.","solutions":["Run ./gradlew classes (or the full build) before/independently of quarkusDev, then retry","If using a custom source set output, restore the convention or configure the plugin accordingly","Check for earlier compile errors in the Gradle log that prevented class output","Run ./gradlew clean quarkusDev to force a fresh build+dev cycle"],"exampleFix":"// before\n./gradlew quarkusDev   # right after a clean\n// after\n./gradlew classes quarkusDev # or just rerun: the task normally depends on build","handlingStrategy":"validation","validationCode":"File classes = new File(\"build/classes/java/main\");\nif (!classes.isDirectory() || Objects.requireNonNull(classes.list()).length == 0) {\n    // run the build first\n    new ProcessBuilder(\"./gradlew\", \"classes\").inheritIO().start().waitFor();\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never invoke quarkusDev immediately after ./gradlew clean","Check for compile errors before assuming dev mode is broken","Keep default source set output conventions","Add classes/build as an explicit prerequisite in scripts"],"tags":["gradle","dev-mode","compiled-classes","build-output"],"backgroundTag":"missing-build-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"}