protected boolean canGenerateReportInternal()

in src/main/java/org/apache/maven/plugins/pmd/AbstractPmdReport.java [435:464]


    protected boolean canGenerateReportInternal() throws MavenReportException {
        if (!showPmdLog && !warnedAboutShowPmdLog) {
            getLog().warn("The parameter \"showPmdLog\" has been deprecated and will be removed."
                    + "Setting it to \"false\" has no effect.");
            warnedAboutShowPmdLog = true;
        }

        if (aggregate && !project.isExecutionRoot()) {
            return false;
        }

        if (!isAggregator() && "pom".equalsIgnoreCase(project.getPackaging())) {
            return false;
        }

        // if format is XML, we need to output it even if the file list is empty
        // so the "check" goals can check for failures
        if (isXml()) {
            return true;
        }
        try {
            filesToProcess = getFilesToProcess();
            if (filesToProcess.isEmpty()) {
                return false;
            }
        } catch (IOException e) {
            throw new MavenReportException("Failed to determine files to process for PMD", e);
        }
        return true;
    }