public boolean canGenerateReport()

in src/main/java/org/apache/maven/plugins/pmd/CpdReport.java [150:171]


    public boolean canGenerateReport() {
        if (skip) {
            getLog().info("Skipping CPD execution");
            return false;
        }

        boolean result = super.canGenerateReport();
        if (result) {
            try {
                executeCpd();
                if (skipEmptyReport) {
                    result = cpdResult.hasDuplications();
                    if (!result) {
                        getLog().debug("Skipping report since skipEmptyReport is true and there are no CPD issues.");
                    }
                }
            } catch (MavenReportException e) {
                throw new RuntimeException(e);
            }
        }
        return result;
    }