code: static File getOutputFile(MavenProject rootModule, File reportFile, String defaultFile) throws MojoExecutionException {
          File selectedXmlReportFile;
          if (reportFile != null) {
              selectedXmlReportFile = reportFile;
          } else if (rootModule != null) {
              selectedXmlReportFile = new File(getOutputDirectory(rootModule) + "/" + defaultFile);
          } else {
              throw new MojoExecutionException("Cannot determine report file.");
          }
          return selectedXmlReportFile;
      }
docs: Determines a report file name.
  
  @param rootModule The base project.
  @param reportFile The report file as specified in the pom.xml file or on the command line.
  @return The resolved {@link java.io.File}.
  @throws MojoExecutionException If the file cannot be determined.