{"record":{"id":"f056ceab1730a172","repo":"quarkusio/quarkus","slug":"no-reports-in-reportsdir","errorCode":null,"errorMessage":"No reports in ${reportsDir}","messagePattern":"No reports in (.+?)","errorType":"exception","errorClass":"MojoFailureException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/AnalyseCallTreeMojo.java","lineNumber":45,"sourceCode":"    @Parameter(defaultValue = \"${project.build.directory}/reports\")\n    private File reportsDir;\n\n    @Override\n    public void execute() throws MojoExecutionException, MojoFailureException {\n        if (methodName != null && className != null) {\n            throw new MojoFailureException(\"Cannot specify both class and method name\");\n        }\n        String clazz = className;\n        String method = \"<init>\";\n        if (methodName != null) {\n            int index = methodName.lastIndexOf('.');\n            clazz = methodName.substring(0, index);\n            method = methodName.substring(index + 1);\n        }\n\n        File[] files = reportsDir.listFiles();\n        if (files == null) {\n            throw new MojoFailureException(\"No reports in \" + reportsDir);\n        }\n        for (File i : files) {\n            if (i.getName().startsWith(\"call_tree\")) {\n                try {\n                    System.out.println(new ReportAnalyzer(i.getAbsolutePath()).analyse(clazz, method));\n                } catch (Exception e) {\n                    throw new MojoExecutionException(\"Failed\", e);\n                }\n            }\n        }\n    }\n}\n","sourceCodeStart":27,"sourceCodeEnd":58,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/AnalyseCallTreeMojo.java#L27-L58","documentation":"AnalyseCallTreeMojo.execute lists the reportsDir (default ${project.build.directory}/reports) and throws this MojoFailureException if listFiles() returns null — which happens when the directory does not exist or is not readable — so no call tree reports can be analyzed.","triggerScenarios":"Running quarkus:analyze-call-tree when ${project.build.directory}/reports (or the configured reportsDir) does not exist or is a file rather than a directory.","commonSituations":"Forgetting to first generate a call tree report (e.g. via the relevant native/PGO analysis goal); wrong working directory; reportsDir typo.","solutions":["Generate the call tree report first so ${project.build.directory}/reports/call_tree* exists.","Verify reportsDir points at an existing directory containing files named call_tree*.","Check that reportsDir is a directory, not a file."],"exampleFix":"// before\nmvn quarkus:analyze-call-tree -DreportsDir=does/not/exist\n// after\nmvn quarkus:generate-config // ensure report generated first\nmvn quarkus:analyze-call-tree -DreportsDir=target/reports","handlingStrategy":"validation","validationCode":"File dir = new File('target/reports'); if (!dir.isDirectory()) throw new IllegalStateException('Generate call tree report first: missing ' + dir)","typeGuard":null,"tryCatchPattern":"try { ... } catch (MojoFailureException e) { log.error('No reports found — run the report generation goal first'); }","preventionTips":["Always generate reports before analyzing.","Verify reportsDir exists in CI with a precondition step.","Keep the default target/reports layout unless documented."],"tags":["maven","filesystem","missing-file"],"backgroundTag":"file-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}