quarkusio/quarkus · error · MojoFailureException
No reports in ${reportsDir}
Error message
No reports in ${reportsDir} What it means
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.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/AnalyseCallTreeMojo.java:45
@Parameter(defaultValue = "${project.build.directory}/reports")
private File reportsDir;
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
if (methodName != null && className != null) {
throw new MojoFailureException("Cannot specify both class and method name");
}
String clazz = className;
String method = "<init>";
if (methodName != null) {
int index = methodName.lastIndexOf('.');
clazz = methodName.substring(0, index);
method = methodName.substring(index + 1);
}
File[] files = reportsDir.listFiles();
if (files == null) {
throw new MojoFailureException("No reports in " + reportsDir);
}
for (File i : files) {
if (i.getName().startsWith("call_tree")) {
try {
System.out.println(new ReportAnalyzer(i.getAbsolutePath()).analyse(clazz, method));
} catch (Exception e) {
throw new MojoExecutionException("Failed", e);
}
}
}
}
}
View on GitHub (pinned to e1c734241f)
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.
Example fix
// before mvn quarkus:analyze-call-tree -DreportsDir=does/not/exist // after mvn quarkus:generate-config // ensure report generated first mvn quarkus:analyze-call-tree -DreportsDir=target/reports
Defensive patterns
Strategy: validation
Validate before calling
File dir = new File('target/reports'); if (!dir.isDirectory()) throw new IllegalStateException('Generate call tree report first: missing ' + dir) Try / catch
try { ... } catch (MojoFailureException e) { log.error('No reports found — run the report generation goal first'); } Prevention
- Always generate reports before analyzing.
- Verify reportsDir exists in CI with a precondition step.
- Keep the default target/reports layout unless documented.
When it happens
Trigger: 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.
Common situations: Forgetting to first generate a call tree report (e.g. via the relevant native/PGO analysis goal); wrong working directory; reportsDir typo.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Unable to create directory: ${directory}
- Unable to collect the target directories
- Could not create directory ${outputDirectory}
- Could not create directory ${outputDirectory}
- Failed to locate <pluginXml>
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/f056ceab1730a172.
Report an issue: GitHub.